OpentelemetryPhoenix (Opentelemetry Phoenix v1.0.0-rc.4) View Source
OpentelemetryPhoenix uses telemetry handlers to create OpenTelemetry
spans.
Current events which are supported include endpoint start/stop, router start/stop, and router exceptions.
Usage
In your application start:
def start(_type, _args) do
OpenTelemetry.register_application_tracer(:my_app)
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
Specs
endpoint_prefix() :: {:endpoint_prefix, [atom()]}
The endpoint prefix in your endpoint. Defaults to [:phoenix, :endpoint]
Specs
opts() :: [endpoint_prefix()]
Setup options
Link to this section Functions
Specs
setup(opts()) :: :ok
Initializes and configures the telemetry handlers.