mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-10 04:35:46 -04:00
add Scope.to_span_ctx
This commit is contained in:
parent
1b9ba95faf
commit
e001d62fd5
1 changed files with 4 additions and 0 deletions
|
|
@ -672,6 +672,10 @@ module Scope = struct
|
|||
mutable attrs: key_value list;
|
||||
}
|
||||
|
||||
(** Turn the scope into a span context *)
|
||||
let[@inline] to_span_ctx (self : t) : Span_ctx.t =
|
||||
Span_ctx.make ~trace_id:self.trace_id ~parent_id:self.span_id ()
|
||||
|
||||
(** 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue