View Source SpandexPhoenix.Telemetry (spandex_phoenix v1.1.0)
Defines the :telemetry
handlers to attach tracing to Phoenix Telemetry.
See install/1
documentation for usage.
Link to this section Summary
Functions
Installs :telemetry
event handlers for Phoenix Telemetry events.
Link to this section Functions
Installs :telemetry
event handlers for Phoenix Telemetry events.
Plug.Telemetry
must be included in your endpoint or router for traces to
function properly. If you upgraded to Phoenix 1.5, you must add the plug yourself.
The Phoenix 1.5 installer includes the plug in your endpoint automatically.
options
Options
:tracer
(Atom
)The tracing module to be used for traces in your Endpoint.
Default:
Application.get_env(:spandex_phoenix, :tracer)
:endpoint_telemetry_prefix
(Atom
)The telemetry prefix passed to
Plug.Telemetry
in the endpoint you want to trace.Default:
[:phoenix, :endpoint]
:filter_traces
(fun((Plug.Conn.t()) -> boolean)
)A function that takes a conn and returns true if a trace should be created for that conn, and false if it should be ignored.
Default:
&SpandexPhoenix.trace_all_requests/1
:span_name
(String.t()
)The name for the span this module creates.
Default:
"request"
:span_opts
(Spandex.Tracer.opts()
)A list of span options to pass during the creation or continuation of the top level span.
Default:
[type: :web]
:customize_metadata
(fun((Plug.Conn.t()) -> Keyword.t())
)A function that takes a conn and returns a keyword list of metadata.
Default:
&SpandexPhoenix.default_metadata/1