HoneylixirTracing.Propagation (honeylixir_tracing v0.3.2) View Source

Module responsible for enabling trace propagation.

Propagation can be used to pass trace information between Processes within the same application or serialized to be sent to other services for distributed tracing.

Link to this section Summary

Types

t()

Struct used to pass propagation around between Elixir processes.

Functions

Provides map of the header key to the propogation context as a string.

Parses out the Honeycomb trace header string.

Link to this section Types

Specs

t() :: %HoneylixirTracing.Propagation{
  context: nil,
  dataset: String.t(),
  parent_id: String.t(),
  trace_id: String.t()
}

Struct used to pass propagation around between Elixir processes.

Can also be serialized with Kernel.to_string/1 as it implements String.Chars for use in headers.

Link to this section Functions

Specs

header(t()) :: %{required(String.t()) => String.t()}

Provides map of the header key to the propogation context as a string.

Sets the Header key to "X-Honeycomb-Trace" in the map. Note that context is given as an empty string for now as trace fields are not supported.

Specs

parse_header(String.t()) :: t() | nil

Parses out the Honeycomb trace header string.

Note that the context is ignored as trace fields are not currently supported. If the parsing fails, nil is returned.