View Source Spandex.Plug.AddContext (Spandex v3.2.0)
Adds request context to the top span of the trace, setting the resource, method, url, service, type and env
Link to this section Summary
Functions
Callback implementation for Plug.call/2
.
Starts a trace, considering the filters/parameters in the provided options.
Link to this section Functions
@spec call(conn :: Plug.Conn.t(), _opts :: Keyword.t()) :: Plug.Conn.t()
Callback implementation for Plug.call/2
.
Starts a trace, considering the filters/parameters in the provided options.
opts
Opts
tracer
(:atom
) Required: The tracing module to be used to start the trace.allowed_route_replacements
([{:list, :atom}, nil]
): A list of route parts that may be replaced with their actual value. If not set or set to nil, then all will be allowed, unless they are disallowed. - Default: nildisallowed_route_replacements
({:list, :atom}
): A list of route parts that may not be replaced with their actual value. - Default: []query_params
({:list, :atom}
): A list of query params who's value will be included in the resource name. - Default: []tracer_opts
(:keyword
): Any opts to be passed to the tracer when starting or continuing the trace. - Default: []
You would generally not use allowed_route_replacements
and disallowed_route_replacements
together.