Spandex v1.0.3 Spandex.Datadog.Span View Source

In charge of holding the datadog span attributes, and for starting/ending spans. This also handles serialization via to_map/1, and span inheritance via child_of/3

Link to this section Summary

Functions

Creates new span based on parent span

Creates new struct with defaults from :spandex configuration

Sets completion time for given span if it’s missing as unix epoch in nanoseconds

Creates a final map structure suitable for datadog trace agent

Updates span with given map. Only @updateable_keys are allowed for updates

Link to this section Types

Link to this type t() View Source
t() :: %Spandex.Datadog.Span{completion_time: term, env: term, error: term, error_message: term, error_type: term, id: term, meta: term, method: term, name: term, parent_id: term, resource: term, service: term, sql_db: term, sql_query: term, sql_rows: term, stacktrace: term, start: term, status: term, trace_id: term, type: term, url: term, user: term}

Link to this section Functions

Link to this function child_of(parent, name) View Source
child_of(parent :: t, name :: term) :: t

Creates new span based on parent span.

Link to this function new(map \\ %{}) View Source
new(map :: map) :: t

Creates new struct with defaults from :spandex configuration.

Link to this function stop(span) View Source
stop(span :: t) :: t

Sets completion time for given span if it’s missing as unix epoch in nanoseconds.

Link to this function to_map(span) View Source
to_map(span :: t) :: map

Creates a final map structure suitable for datadog trace agent.

Link to this function update(span, updates) View Source
update(span :: t, updates :: map) :: t

Updates span with given map. Only @updateable_keys are allowed for updates.