View Source Spandex.Plug.StartTrace (Spandex v3.2.0)
Starts a trace, skipping ignored routes or methods. Store info in Conn assigns if we actually trace the request.
Link to this section Summary
Functions
Callback implementation for Plug.call/2
.
Accepts and validates opts for the plug, and underlying tracer.
Link to this section Functions
@spec call(conn :: Plug.Conn.t(), opts :: Keyword.t()) :: Plug.Conn.t()
Callback implementation for Plug.call/2
.
Accepts and validates opts for the plug, and underlying tracer.
opts
Opts
tracer
(:atom
) Required: The tracing module to be used to start the trace.ignored_methods
({:list, :string}
): A list of strings representing methods to ignore. A good example would be["OPTIONS"]
- Default: []ignored_routes
({:list, [:regex, :string]}
): A list of strings or regexes. If it is a string, it must match exactly. - Default: []tracer_opts
(:keyword
): Any opts to be passed to the tracer when starting or continuing the trace. - Default: []span_name
(:string
): The name to be used for the top level span. - Default: "request"