Update src/core/opentelemetry.ml

This commit is contained in:
Simon Cruanes 2024-10-21 10:40:46 -04:00 committed by GitHub
parent 53c1ddba8c
commit 865b446829
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -984,14 +984,7 @@ end = struct
let set_status (scope : t) (status : Span_status.t) : unit =
if Collector.has_backend () then (
let rec loop acc = function
| Nil -> acc
| Span_status (_, l) -> loop acc l
| Ev (ev, l) -> loop (Ev (ev, acc)) l
| Attr (attr, l) -> loop (Attr (attr, acc)) l
| Span_link (link, l) -> loop (Span_link (link, acc)) l
in
scope.items <- loop (Span_status (status, Nil)) scope.items
scope.items <- Span_status (status, scope.items)
)
let ambient_scope_key : t Ambient_context.key = Ambient_context.create_key ()