mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
fix: always enter new scope in opentelemetry-trace
thanks to @ELLIOTTCABLE for finding this
This commit is contained in:
parent
a4ead618c5
commit
83b9837778
1 changed files with 1 additions and 3 deletions
|
|
@ -61,9 +61,7 @@ let collector () : Trace.collector =
|
||||||
in
|
in
|
||||||
|
|
||||||
let new_scope =
|
let new_scope =
|
||||||
match old_scope with
|
{ Otel.Scope.span_id; trace_id; events = []; attrs = [] }
|
||||||
| None -> { Otel.Scope.span_id; trace_id; events = []; attrs = [] }
|
|
||||||
| Some sc -> sc
|
|
||||||
in
|
in
|
||||||
TLS.set Otel.Scope._global_scope new_scope;
|
TLS.set Otel.Scope._global_scope new_scope;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue