debug in bounded queue sync

This commit is contained in:
Simon Cruanes 2026-03-04 13:11:04 -05:00
parent f70e5ae4a2
commit 875101de9b
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -98,9 +98,12 @@ let push (self : _ state) x =
| Closed ->
ignore (Atomic.fetch_and_add self.n_discarded (List.length x) : int)
| Pushed { num_discarded } ->
if num_discarded > 0 then
if num_discarded > 0 then (
ignore (Atomic.fetch_and_add self.n_discarded num_discarded : int);
Opentelemetry.Self_debug.log Warning (fun () ->
Printf.sprintf "otel: dropped %d signals (exporter queue full)"
num_discarded)
);
(* wake up potentially asleep consumers *)
Cb_set.trigger self.on_non_empty
)