View Source OpentelemetryPhoenix (Opentelemetry Phoenix v1.0.0)
OpentelemetryPhoenix uses telemetry handlers to create OpenTelemetry
spans.
Current events which are supported include endpoint start/stop, router start/stop, and router exceptions.
usage
Usage
In your application start:
def start(_type, _args) do
OpentelemetryPhoenix.setup()
children = [
{Phoenix.PubSub, name: MyApp.PubSub},
MyAppWeb.Endpoint
]
opts = [strategy: :one_for_one, name: MyStore.Supervisor]
Supervisor.start_link(children, opts)
end
Link to this section Summary
Functions
Initializes and configures the telemetry handlers.
Link to this section Types
@type endpoint_prefix() :: {:endpoint_prefix, [atom()]}
The endpoint prefix in your endpoint. Defaults to [:phoenix, :endpoint]
@type opts() :: [endpoint_prefix()]
Setup options
Link to this section Functions
@spec setup(opts()) :: :ok
Initializes and configures the telemetry handlers.