mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-07 18:37:56 -05:00
debug in bounded queue sync
This commit is contained in:
parent
f70e5ae4a2
commit
875101de9b
1 changed files with 5 additions and 2 deletions
|
|
@ -98,9 +98,12 @@ let push (self : _ state) x =
|
||||||
| Closed ->
|
| Closed ->
|
||||||
ignore (Atomic.fetch_and_add self.n_discarded (List.length x) : int)
|
ignore (Atomic.fetch_and_add self.n_discarded (List.length x) : int)
|
||||||
| Pushed { num_discarded } ->
|
| Pushed { num_discarded } ->
|
||||||
if num_discarded > 0 then
|
if num_discarded > 0 then (
|
||||||
ignore (Atomic.fetch_and_add self.n_discarded num_discarded : int);
|
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 *)
|
(* wake up potentially asleep consumers *)
|
||||||
Cb_set.trigger self.on_non_empty
|
Cb_set.trigger self.on_non_empty
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue