# `PhoenixAI.Store.HandlerGuardian`
[🔗](https://github.com/franciscpd/phoenix-ai-store/blob/v0.1.0/lib/phoenix_ai/store/handler_guardian.ex#L1)

Supervised GenServer that ensures the telemetry handler stays attached.

On init, attaches `TelemetryHandler`. Periodically checks that the handler
is still registered with `:telemetry` and reattaches if missing.

## Options

  * `:name` — GenServer name (required)
  * `:handler_opts` — options passed to `TelemetryHandler.attach/1` (default: `[]`)
  * `:interval` — check interval in ms (default: `30_000`)

## Usage

    # As part of a supervision tree:
    children = [
      {HandlerGuardian, name: :my_guardian, interval: 30_000}
    ]

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the HandlerGuardian GenServer.

---

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