Module Opentelemetry.Span_ctx

Span context. This bundles up a trace ID and parent ID.

https://opentelemetry.io/docs/specs/otel/trace/api/#spancontext

type t
val make : trace_id:Trace_id.t -> parent_id:Span_id.t -> unit -> t
val dummy : t

Invalid span context, to be used as a placeholder

val is_valid : t -> bool
val trace_id : t -> Trace_id.t
val parent_id : t -> Span_id.t
val is_remote : t -> bool
val to_w3c_trace_context : t -> bytes
val of_w3c_trace_context : bytes -> (t, string) result
val of_w3c_trace_context_exn : bytes -> t
  • raises Invalid_argument

    if parsing failed