spandex_datadog v0.2.0 SpandexDatadog.ApiServer
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
format(span)
deprecated
Builds server state
Send spans asynchronously to DataDog
Starts genserver with given options
Link to this section Functions
Link to this function
child_spec(arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
format(span)
format(Spandex.Trace.t()) :: map()
format(Spandex.Span.t()) :: map()
This function is deprecated. Please use format/3 instead.
Link to this function
format(span, priority, baggage)
format(Spandex.Span.t(), integer(), Keyword.t()) :: map()
Link to this function
init(opts)
init(opts :: Keyword.t()) :: {:ok, SpandexDatadog.ApiServer.State.t()}
Builds server state.
Link to this function
send_and_log(traces, state)
send_and_log([Spandex.Trace.t()], SpandexDatadog.ApiServer.State.t()) :: :ok
Link to this function
send_trace(trace, opts \\ [])
send_trace(Spandex.Trace.t(), Keyword.t()) :: :ok
Send spans asynchronously to DataDog.
Starts genserver with given options.
Opts
http
(:atom
) Required: The HTTP module to use for sending spans to the agent. Currently only HTTPoison has been testedhost
(:string
): The host the agent can be reached at - Default: “localhost”port
([:integer, :string]
): The port to use when sending traces to the agent - Default: 8126verbose?
(:boolean
): Only to be used for debugging: All finished traces will be logged - Default: falsebatch_size
(:integer
): The number of traces that should be sent in a single batch - Default: 10sync_threshold
(:integer
): The maximum number of processes that may be sending traces at any one time. This adds backpressure - Default: 20api_adapter
(:atom
): Which api adapter to use. Currently only used for testing - Default: SpandexDatadog.ApiServer