mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05: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
|
| _ -> Collector.dummy_explicit_span
|
||||||
|
|
||||||
let[@inline] exit_manual_span espan : unit =
|
let[@inline] exit_manual_span espan : unit =
|
||||||
match A.get collector with
|
if espan != Collector.dummy_explicit_span then (
|
||||||
| None -> ()
|
match A.get collector with
|
||||||
| Some (module C) -> C.exit_manual_span espan
|
| None -> ()
|
||||||
|
| Some (module C) -> C.exit_manual_span espan
|
||||||
|
)
|
||||||
|
|
||||||
let[@inline] add_data_to_span sp data : unit =
|
let[@inline] add_data_to_span sp data : unit =
|
||||||
if data <> [] then (
|
if sp != Collector.dummy_span && data <> [] then (
|
||||||
match A.get collector with
|
match A.get collector with
|
||||||
| None -> ()
|
| None -> ()
|
||||||
| Some (module C) -> C.add_data_to_span sp data
|
| Some (module C) -> C.add_data_to_span sp data
|
||||||
)
|
)
|
||||||
|
|
||||||
let[@inline] add_data_to_manual_span esp data : unit =
|
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
|
match A.get collector with
|
||||||
| None -> ()
|
| None -> ()
|
||||||
| Some (module C) -> C.add_data_to_manual_span esp data
|
| Some (module C) -> C.add_data_to_manual_span esp data
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue