This commit is contained in:
Simon Cruanes 2026-01-17 23:03:35 -05:00
parent ee144aec22
commit 0c119c3eff
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 4 additions and 6 deletions

View file

@ -35,8 +35,6 @@ open struct
let k_span_ctx : OTEL.Span_ctx.t Ambient_context.Context.key = let k_span_ctx : OTEL.Span_ctx.t Ambient_context.Context.key =
Ambient_context.Context.new_key () Ambient_context.Context.new_key ()
(* TODO: params *)
let enter_span (self : state) ~__FUNCTION__ ~__FILE__ ~__LINE__ ~params:_ let enter_span (self : state) ~__FUNCTION__ ~__FILE__ ~__LINE__ ~params:_
~(data : (_ * Otrace.user_data) list) ~parent name : Otrace.span = ~(data : (_ * Otrace.user_data) list) ~parent name : Otrace.span =
let start_time = OTEL.Clock.now self.clock in let start_time = OTEL.Clock.now self.clock in

View file

@ -68,7 +68,9 @@ let run_job () =
let _arr : _ array = let _arr : _ array =
Sys.opaque_identity @@ Array.make (25 * 25551) 42.0 Sys.opaque_identity @@ Array.make (25 * 25551) 42.0
in in
ignore _arr ignore _arr;
OT.Span.add_event scope (OT.Event.make "done with alloc")
); );
if !sleep_inner > 0. then ( if !sleep_inner > 0. then (
@ -76,10 +78,8 @@ let run_job () =
Atomic.incr num_sleep Atomic.incr num_sleep
); );
if j = 4 && !i mod 13 = 0 then failwith "oh no";
(* simulate a failure *) (* simulate a failure *)
OT.Span.add_event scope (OT.Event.make "done with alloc") if j = 4 && !i mod 13 = 0 then failwith "oh no"
with Failure _ -> () with Failure _ -> ()
done done
done; done;