mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
refactor emit1
This commit is contained in:
parent
89dae63114
commit
a9f17ef54b
1 changed files with 2 additions and 4 deletions
|
|
@ -29,8 +29,7 @@ let run () =
|
||||||
|
|
||||||
for j=0 to 4 do
|
for j=0 to 4 do
|
||||||
|
|
||||||
let@ scope = T.Trace.with_ ~kind:T.Span.Span_kind_internal
|
let@ scope = T.Trace.with_ ~kind:T.Span.Span_kind_internal ~scope
|
||||||
~trace_id:scope.trace_id ~parent:scope.span_id
|
|
||||||
~attrs:["j", `Int j]
|
~attrs:["j", `Int j]
|
||||||
"loop.inner" in
|
"loop.inner" in
|
||||||
Unix.sleepf !sleep_outer;
|
Unix.sleepf !sleep_outer;
|
||||||
|
|
@ -39,8 +38,7 @@ let run () =
|
||||||
|
|
||||||
(try
|
(try
|
||||||
let@ _ =
|
let@ _ =
|
||||||
T.Trace.with_ ~kind:T.Span.Span_kind_internal
|
T.Trace.with_ ~kind:T.Span.Span_kind_internal ~scope
|
||||||
~trace_id:scope.trace_id ~parent:scope.span_id
|
|
||||||
"alloc" in
|
"alloc" in
|
||||||
(* allocate some stuff *)
|
(* allocate some stuff *)
|
||||||
let _arr = Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 in
|
let _arr = Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 in
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue