mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-07 18:37:56 -05:00
fix(ocurl): check for batch timeouts in exporter as well
This commit is contained in:
parent
3a72a73c15
commit
03313e9121
1 changed files with 3 additions and 2 deletions
|
|
@ -401,8 +401,9 @@ let mk_emitter ~(config:Config.t) () : (module EMITTER) =
|
|||
let bg_thread () =
|
||||
while !continue do
|
||||
let@ () = guard in
|
||||
if emit_metrics () then ()
|
||||
else if emit_traces () then ()
|
||||
let timeout = batch_timeout() in
|
||||
if emit_metrics ~force:timeout () then ()
|
||||
else if emit_traces ~force:timeout () then ()
|
||||
else (
|
||||
(* wait *)
|
||||
let@ () = with_mutex_ m in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue