Spandex v1.0.3 Spandex.Adapters.Datadog View Source

A datadog APM implementation for spandex.

Link to this section Summary

Functions

Continues a trace given a name, a trace_id and a span_id

Gets the current span id

Gets the current trace id

Completes the current span, moving it from the top of the span stack to the list of completed spans

Sends the trace to datadog and clears out the current trace data

Attaches error data to the current span, and marks it as an error

Starts a span and adds it to the span stack

Starts a trace context in process local storage

Does any required setup on application start

Updates all spans

Updates a span according to the provided context. See Spandex.Datadog.Span.update/2 for more information

Updates the top level span with information. Useful for setting overal trace context

Link to this section Functions

Link to this function continue_trace(name, trace_id, span_id) View Source
continue_trace(String.t, term, term) ::
  {:ok, term} |
  {:error, term}

Continues a trace given a name, a trace_id and a span_id

Link to this function current_span_id() View Source
current_span_id() :: term | nil | {:error, term}

Gets the current span id

Link to this function current_trace_id() View Source
current_trace_id() :: term | nil | {:error, term}

Gets the current trace id

Link to this function finish_span() View Source
finish_span() :: :ok | {:error, term}

Completes the current span, moving it from the top of the span stack to the list of completed spans.

Link to this function finish_trace() View Source
finish_trace() :: :ok | {:error, :no_trace_context}

Sends the trace to datadog and clears out the current trace data

Link to this function span_error(exception) View Source
span_error(Exception.t) :: :ok | {:error, term}

Attaches error data to the current span, and marks it as an error.

Link to this function start_span(name) View Source
start_span(String.t) :: {:ok, term} | {:error, term}

Starts a span and adds it to the span stack.

Link to this function start_trace(name) View Source
start_trace(String.t) :: {:ok, term} | {:error, term}

Starts a trace context in process local storage.

Link to this function startup() View Source
startup() :: :ok | {:error, term}

Does any required setup on application start.

Link to this function update_all_spans(context) View Source
update_all_spans(map) :: :ok | {}

Updates all spans

Link to this function update_span(context) View Source
update_span(map) :: :ok | {:error, term}

Updates a span according to the provided context. See Spandex.Datadog.Span.update/2 for more information.

Link to this function update_top_span(context) View Source
update_top_span(map) :: :ok | {:error, term}

Updates the top level span with information. Useful for setting overal trace context