Absurd.Telemetry (absurd v0.2.0)

Copy Markdown View Source

Telemetry contract for Absurd database calls and task execution.

SQL operations emit [:absurd, :sql, operation, phase]. Runner executions emit [:absurd, :runner, :execute, phase]. The final element is :start, :stop, or :exception.

Start measurements contain :system_time; stop and exception measurements contain monotonic :duration. Metadata identifies stable operations and durable names but never includes task parameters, results, headers, or exception values. Telemetry reports observed SDK behavior and is not evidence that an ambiguous database transaction committed.

Attach handlers to the concrete operations and phases an application needs:

:telemetry.attach_many(
  "my-app-absurd",
  [
    [:absurd, :sql, :spawn_task, :stop],
    [:absurd, :runner, :execute, :stop],
    [:absurd, :runner, :execute, :exception]
  ],
  &MyApp.AbsurdTelemetry.handle_event/4,
  nil
)

Examples

iex> Absurd.Telemetry.event_prefix()
[:absurd]

Summary

Functions

Returns the common prefix used by every SDK telemetry event.

Functions

event_prefix()

@spec event_prefix() :: [atom()]

Returns the common prefix used by every SDK telemetry event.