SpandexDatadog.ApiServer (spandex_datadog v1.3.0)
Implements worker for sending spans to datadog as GenServer in order to send traces async.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Send spans asynchronously to DataDog.
Starts the ApiServer with given options.
Link to this section Types
Link to this section Functions
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
format(span, priority, baggage)
@spec format(Spandex.Span.t(), integer(), Keyword.t()) :: map()
Link to this function
send_and_log(traces, state)
@spec send_and_log([Spandex.Trace.t()], SpandexDatadog.ApiServer.State.t()) :: :ok
Link to this function
send_trace(trace, opts \\ [])
@spec send_trace(Spandex.Trace.t(), Keyword.t()) :: :ok
Send spans asynchronously to DataDog.
Link to this function
start_link(opts \\ [])
@spec start_link(opts :: Keyword.t()) :: GenServer.on_start()
Starts the ApiServer with given options.
options
Options
:http
- The HTTP module to use for sending spans to the agent. Defaults toHTTPoison
.:host
- The host the agent can be reached at. Defaults to"localhost"
.:port
- The port to use when sending traces to the agent. Defaults to8126
.:verbose?
- Only to be used for debugging: All finished traces will be logged. Defaults tofalse
:batch_size
- The number of traces that should be sent in a single batch. Defaults to10
.:sync_threshold
- The maximum number of processes that may be sending traces at any one time. This adds backpressure. Defaults to20
.