Spandex v1.4.0 Spandex.Tracer behaviour View Source
A module that can be used to build your own tracer.
Example:
defmodule MyApp.Tracer do
use Spandex.Tracer, otp_app: :my_app
end
Link to this section Summary
Functions
A schema for the opts that a tracer accepts
Link to this section Types
Link to this section Functions
A schema for the opts that a tracer accepts.
Opts
adapter
(:atom
) Required: The third party adapter to use.service
(:atom
) Required: The default service name to use for spans declared without a service.disabled?
(:boolean
): Allows for wholesale disabling a tracer. - Default: falseenv
(:string
): A name used to identify the environment name, e.gprod
ordevelopment
- Default: “unknown”services
({:keyword, :atom}
): A mapping of service name to the default span types. For instance datadog knows about:db
,:cache
and:web
- Default: []sender
(:atom
): Will be deprecated soon, but this is a module that defines asend_spans/1
function. - Default: Spandex.Datadog.ApiServer
All tracer functions that take opts use this schema.
Link to this section Callbacks
Link to this callback
continue_trace(span_name, trace_id, span_id, opts)
View Source
continue_trace(span_name, trace_id :: term, span_id :: term, opts) :: tagged_tuple
Link to this callback
continue_trace_from_span(span_name, span, opts)
View Source
continue_trace_from_span(span_name, span :: term, opts) :: tagged_tuple
Link to this callback
distributed_context(arg0, opts)
View Source
distributed_context(Plug.Conn.t, opts) :: tagged_tuple
Link to this macro callback
span(span_name, attributes, opts, list)
View Source
span(term, span_name, attributes, opts, [{:do, Macro.t}]) :: Macro.t
Link to this callback
span_error(error, opts)
View Source
span_error(error :: Exception.t, opts) :: tagged_tuple
Link to this callback
start_span(span_name, attributes, opts)
View Source
start_span(span_name, attributes, opts) :: tagged_tuple
Link to this callback
start_trace(span_name, attributes, opts)
View Source
start_trace(span_name, attributes, opts) :: tagged_tuple
Link to this macro callback
trace(span_name, attributes, opts, list)
View Source
trace(term, span_name, attributes, opts, [{:do, Macro.t}]) :: Macro.t
Link to this callback
update_span(attributes, opts)
View Source
update_span(attributes, opts) :: tagged_tuple
Link to this callback
update_top_span(attributes, opts)
View Source
update_top_span(attributes, opts) :: tagged_tuple