Drop-in OpenTelemetry agent for Elixir applications.
See the README for the complete installation and configuration
guide. The module documentation below describes the use API and callbacks.
use options
:ecto_prefixes— Ecto telemetry prefixes for baseline DB metrics (e.g.[[:my_app, :repo]]). Also passed toOpentelemetryEcto.setup/1when:auto_instrumentistrue.:baseline_metrics—true(default),false, or a keyword of groups:[vm: true, http: true, ecto: true, graphql: true]when Absinthe is loaded, otherwisegraphql: false.:auto_instrument—true(default) orfalse. Whentrue, the agent attaches the built-in Phoenix, Ecto, Bandit/Cowboy, Absinthe, and Oban instrumentations automatically on start (when their modules are present and:phoenix_adaptermatches the server adapter). Set tofalseif you want to call those yourself fromon_start/0.
Summary
Callbacks
Optional callback returning app-specific Telemetry.Metrics definitions.
Optional callback invoked when the agent supervisor starts and the agent is enabled.
Functions
Applies library defaults to use options.
Callbacks
@callback extra_metrics() :: [Telemetry.Metrics.t()]
Optional callback returning app-specific Telemetry.Metrics definitions.
Merged after the agent baseline metrics.
@callback on_start() :: :ok | any()
Optional callback invoked when the agent supervisor starts and the agent is enabled.
Use it for any additional one-shot setup that the automatic instrumentation
does not cover. The built-in Phoenix, Ecto, server adapter, Absinthe, and
Oban instrumentations are attached automatically unless :auto_instrument
is false.
Functions
Applies library defaults to use options.
Currently sets baseline_metrics: [graphql: true] when Absinthe is
loaded in the host project, unless the user already supplied a
:baseline_metrics value.