# `AshClickhouse.Telemetry`
[🔗](https://github.com/ohhi-vn/ash_clickhouse/blob/main/lib/ash_clickhouse/telemetry.ex#L1)

Telemetry helpers for AshClickhouse.

Emits `[:ash_clickhouse, :query, :start | :stop | :exception]` events around
every query executed against ClickHouse, mirroring the structure used by
Ash data layers.

# `span`

```elixir
@spec span(Ash.Resource.t() | nil, atom(), String.t(), (-&gt; term())) :: term()
```

Spans a query execution, emitting telemetry start/stop/exception events.

Returns the result of `fun` directly. Exceptions raised inside `fun` are
allowed to propagate: `:telemetry.span/3` catches them, emits the
`[:ash_clickhouse, :query, :exception]` event, and reraises, so callers
can translate the reraised error into an Ash-friendly error.

---

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