mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 04:17:56 -04:00
in remove_backend, call tick() then cleanup() on it
This commit is contained in:
parent
0ef97a002a
commit
1924ff788b
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