Opentelemetry Phoenix v0.2.0 OpentelemetryPhoenix 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

Types

The endpoint prefix in your endpoint. Defaults to [:phoenix, :endpoint]

Setup options

Functions

Initializes and configures the telemetry handlers.

Link to this section Types

Link to this type

endpoint_prefix()

View Source
endpoint_prefix() :: {:endpoint_prefix, [atom()]}

The endpoint prefix in your endpoint. Defaults to [:phoenix, :endpoint]

Setup options

Link to this section Functions

Link to this function

setup(opts \\ [])

View Source
setup(opts()) :: :ok

Initializes and configures the telemetry handlers.