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()

Builds server state.

Link to this function send_and_log(traces, state)
Link to this function send_trace(trace, opts \\ [])
send_trace(Spandex.Trace.t(), Keyword.t()) :: :ok

Send spans asynchronously to DataDog.

Link to this function start_link(opts)
start_link(opts :: Keyword.t()) :: GenServer.on_start()

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 tested
  • host(: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: 8126
  • verbose?(:boolean): Only to be used for debugging: All finished traces will be logged - Default: false
  • batch_size(:integer): The number of traces that should be sent in a single batch - Default: 10
  • sync_threshold(:integer): The maximum number of processes that may be sending traces at any one time. This adds backpressure - Default: 20
  • api_adapter(:atom): Which api adapter to use. Currently only used for testing - Default: SpandexDatadog.ApiServer