AshClickhouse.Telemetry (AshClickhouse v0.1.0)

Copy Markdown View Source

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.

Summary

Functions

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

Functions

span(resource, event, query, fun)

@spec span(Ash.Resource.t() | nil, atom(), String.t(), (-> term())) :: term()

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

Returns the result of fun, or re-raises after emitting an exception event.