mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
test: simulate some failing span
This commit is contained in:
parent
958d79c875
commit
bfa534e31c
1 changed files with 4 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ let run () =
|
||||||
|
|
||||||
incr i;
|
incr i;
|
||||||
|
|
||||||
begin
|
(try
|
||||||
let@ _ =
|
let@ _ =
|
||||||
T.Trace.with_ ~kind:T.Span.Span_kind_internal
|
T.Trace.with_ ~kind:T.Span.Span_kind_internal
|
||||||
~trace_id:tr ~parent:sp
|
~trace_id:tr ~parent:sp
|
||||||
|
|
@ -40,7 +40,9 @@ let run () =
|
||||||
let _arr = Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 in
|
let _arr = Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 in
|
||||||
ignore _arr;
|
ignore _arr;
|
||||||
Unix.sleepf 0.1;
|
Unix.sleepf 0.1;
|
||||||
end;
|
if j=4 && !i mod 13 = 0 then failwith "oh no"; (* simulate a failure *)
|
||||||
|
with Failure _ ->
|
||||||
|
());
|
||||||
done;
|
done;
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue