mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-08 03:47:57 -04:00
fixes: check for dummy spans in some operations
This commit is contained in:
parent
b52f15068d
commit
e76a977330
1 changed files with 7 additions and 5 deletions
|
|
@ -83,19 +83,21 @@ let[@inline] enter_manual_toplevel_span ?flavor ?level ?__FUNCTION__ ~__FILE__
|
|||
| _ -> Collector.dummy_explicit_span
|
||||
|
||||
let[@inline] exit_manual_span espan : unit =
|
||||
match A.get collector with
|
||||
| None -> ()
|
||||
| Some (module C) -> C.exit_manual_span espan
|
||||
if espan != Collector.dummy_explicit_span then (
|
||||
match A.get collector with
|
||||
| None -> ()
|
||||
| Some (module C) -> C.exit_manual_span espan
|
||||
)
|
||||
|
||||
let[@inline] add_data_to_span sp data : unit =
|
||||
if data <> [] then (
|
||||
if sp != Collector.dummy_span && data <> [] then (
|
||||
match A.get collector with
|
||||
| None -> ()
|
||||
| Some (module C) -> C.add_data_to_span sp data
|
||||
)
|
||||
|
||||
let[@inline] add_data_to_manual_span esp data : unit =
|
||||
if data <> [] then (
|
||||
if esp != Collector.dummy_explicit_span && data <> [] then (
|
||||
match A.get collector with
|
||||
| None -> ()
|
||||
| Some (module C) -> C.add_data_to_manual_span esp data
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue