# `PhoenixReplay.Capture.Handlers`
[🔗](https://github.com/elixir-vibe/phoenix_replay/blob/v0.6.2/lib/phoenix_replay/capture/handlers.ex#L1)

Owns the telemetry and `:logger` handlers that record sessions.

Handlers are global and outlive the process that attaches them, so this
process ties their lifetime to the supervision tree: it attaches
`PhoenixReplay.Capture.ViewEvents`, `PhoenixReplay.Capture.LiveComponents`, the configured
`PhoenixReplay.Capture.TelemetryEvents` and `PhoenixReplay.Capture.Logs`
when it starts, and detaches them when it stops. It traps exits so it
detaches them on shutdown, and detaches leftovers before attaching, so a
restart after it was killed attaches each handler once.

The handlers run in the processes that emit events, not in this one, so
recording never waits on it.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(PhoenixReplay.Config.t()) :: GenServer.on_start()
```

Starts the handler owner registered under its module name.

---

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