Jido.Observe.SpanCtx (Jido v2.0.0-rc.1)

View Source

Span context for observability tracking.

Contains all necessary information to finish a span that was started with Jido.Observe.start_span/2.

Summary

Functions

Creates a new SpanCtx from a map of attributes.

Creates a new SpanCtx from a map, raising on error.

Types

t()

@type t() :: %Jido.Observe.SpanCtx{
  event_prefix: [atom()],
  metadata: map(),
  start_system_time: integer(),
  start_time: integer(),
  tracer_ctx: any()
}

Functions

new(attrs)

@spec new(map()) :: {:ok, t()} | {:error, term()}

Creates a new SpanCtx from a map of attributes.

Returns {:ok, span_ctx} or {:error, reason}.

new!(attrs)

@spec new!(map()) :: t()

Creates a new SpanCtx from a map, raising on error.