Opentelemetry.ScopeSourceScopes.
A scope is a trace ID and the span ID of the currently active span.
type t = private {trace_id : Trace_id.t;span_id : Span_id.t;mutable items : item_list;mutable hmap : Hmap.t;additional data,
*)}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 ->
?status:Span_status.t ->
unit ->
tval to_span_link :
?trace_state:string ->
?attrs:key_value list ->
?dropped_attributes_count:int ->
t ->
Span_link.tTurn the scope into a span link
Turn the scope into a span context
Add an event to the scope. It will be aggregated into the span.
Note that this takes a function that produces an event, and will only call it if there is an instrumentation backend.
Add attributes to the scope. It will be aggregated into the span.
Note that this takes a function that produces attributes, and will only call it if there is an instrumentation backend.
Add links to the scope. It will be aggregated into the span.
Note that this takes a function that produces links, and will only call it if there is an instrumentation backend.
set the span status.
Note that this function will be called only if there is an instrumentation backend.
Set the span's kind.
The opaque key necessary to access/set the ambient scope with Ambient_context.
Obtain current scope from Ambient_context, if available.
with_ambient_scope sc thunk calls thunk() in a context where sc is the (thread|continuation)-local scope, then reverts to the previous local scope, if any.