mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
update example
This commit is contained in:
parent
619b389322
commit
9e19e323db
1 changed files with 6 additions and 2 deletions
|
|
@ -24,6 +24,12 @@ let run () =
|
|||
"loop.inner" in
|
||||
Unix.sleepf !sleep_outer;
|
||||
|
||||
T.Logs.(emit [
|
||||
make_strf ~trace_id:scope.trace_id ~span_id:scope.span_id
|
||||
~severity:Severity_number_info
|
||||
"inner at %d" j
|
||||
]);
|
||||
|
||||
incr i;
|
||||
|
||||
(try
|
||||
|
|
@ -36,8 +42,6 @@ let run () =
|
|||
Unix.sleepf !sleep_inner;
|
||||
if j=4 && !i mod 13 = 0 then failwith "oh no"; (* simulate a failure *)
|
||||
|
||||
T.Logs.(emit [make @@ `String "log"]);
|
||||
|
||||
T.Trace.add_event scope (fun()->T.Event.make "done with alloc");
|
||||
with Failure _ ->
|
||||
());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue