mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
test: in emit1, use implicit local storage
This commit is contained in:
parent
6bdf351313
commit
555a69a0de
1 changed files with 3 additions and 2 deletions
|
|
@ -23,16 +23,17 @@ let run_job () =
|
|||
let@ () = Fun.protect ~finally:(fun () -> Atomic.set stop true) in
|
||||
let i = ref 0 in
|
||||
while not @@ Atomic.get stop do
|
||||
let@ scope =
|
||||
let@ _scope =
|
||||
Atomic.incr num_tr;
|
||||
T.Trace.with_ ~kind:T.Span.Span_kind_producer "loop.outer"
|
||||
~attrs:[ "i", `Int !i ]
|
||||
in
|
||||
|
||||
for j = 0 to 4 do
|
||||
(* parent scope is found via thread local storage *)
|
||||
let@ scope =
|
||||
Atomic.incr num_tr;
|
||||
T.Trace.with_ ~kind:T.Span.Span_kind_internal ~scope
|
||||
T.Trace.with_ ~kind:T.Span.Span_kind_internal
|
||||
~attrs:[ "j", `Int j ]
|
||||
"loop.inner"
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue