# `SiteMaps.Telemetry`
[🔗](https://github.com/marcosgz/site_maps_ex/blob/v0.1.0/lib/site_maps/telemetry.ex#L1)

Telemetry events emitted while generating sitemaps.

  * `[:site_maps, :run, :start | :stop | :exception]` - metadata `%{module, context, only}`
  * `[:site_maps, :process, :start | :stop | :exception]` - metadata `%{module, process, args}`
  * `[:site_maps, :urlset, :write]` - measurements `%{links, news, bytes}`,
    metadata `%{module, process, key, url}`
  * `[:site_maps, :index, :write]` - measurements `%{entries, bytes}`, metadata `%{module, key, url}`
  * `[:site_maps, :url, :foreign_host]` - measurements `%{count: 1}`, metadata `%{module, process, loc}`,
    for a URL whose host differs from the sitemap host

`attach_default_logger/1` logs the `:stop`, `:exception`, `:write` and `:foreign_host` events.

# `attach_default_logger`

```elixir
@spec attach_default_logger(keyword()) :: :ok | {:error, :already_exists}
```

Logs the stop, exception, write and foreign host events at `level` (default `:info`).

# `detach_default_logger`

```elixir
@spec detach_default_logger() :: :ok | {:error, :not_found}
```

Detaches the handler attached by `attach_default_logger/1`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
