update example

This commit is contained in:
Simon Cruanes 2022-04-15 21:53:52 -04:00
parent 619b389322
commit 9e19e323db
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -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 _ ->
());