Module Opentelemetry.Scope

Scopes.

A scope is a trace ID and the span ID of the currently active span.

type item_list
type t = {
  1. trace_id : Trace_id.t;
  2. span_id : Span_id.t;
  3. mutable items : item_list;
}
val attrs : t -> key_value list
val events : t -> Event.t list
val make : trace_id:Trace_id.t -> span_id:Span_id.t -> ?events:Event.t list -> ?attrs:key_value list -> ?links:Span_link.t list -> unit -> t
val to_span_ctx : t -> Span_ctx.t
val add_event : t -> (unit -> Event.t) -> unit
val record_exception : t -> exn -> Stdlib.Printexc.raw_backtrace -> unit
val add_attrs : t -> (unit -> key_value list) -> unit
val ambient_scope_key : t {Ambient_context}2.key
val get_ambient_scope : ?scope:t -> unit -> t option
val with_ambient_scope : t -> (unit -> 'a) -> 'a