fix(ocurl): check for batch timeouts in exporter as well

This commit is contained in:
Simon Cruanes 2022-03-22 13:00:06 -04:00
parent 3a72a73c15
commit 03313e9121
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -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