mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
in remove_backend, call tick() then cleanup() on it
This commit is contained in:
parent
97030757c1
commit
a44c5dc33a
1 changed files with 6 additions and 1 deletions
|
|
@ -175,7 +175,12 @@ module Collector = struct
|
|||
|
||||
(** Remove current backend, if any.
|
||||
@since NEXT_RELEASE *)
|
||||
let remove_backend () : unit = Atomic.set backend None
|
||||
let remove_backend () : unit =
|
||||
match Atomic.exchange backend None with
|
||||
| None -> ()
|
||||
| Some (module B) ->
|
||||
B.tick ();
|
||||
B.cleanup ()
|
||||
|
||||
(** Is there a configured backend? *)
|
||||
let[@inline] has_backend () : bool = Atomic.get backend != None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue