mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
fix: smll change for manual spans
This commit is contained in:
parent
797895c193
commit
8ce4f332c6
2 changed files with 4 additions and 4 deletions
|
|
@ -61,7 +61,7 @@ module type S = sig
|
|||
__LINE__:int ->
|
||||
time_ns:float ->
|
||||
tid:int ->
|
||||
parent:explicit_span option ->
|
||||
parent:span option ->
|
||||
data:(string * user_data) list ->
|
||||
name:string ->
|
||||
flavor:[ `Sync | `Async ] option ->
|
||||
|
|
|
|||
|
|
@ -84,10 +84,10 @@ let collector (Sub { st; callbacks = (module CB) } : Subscriber.t) : collector =
|
|||
let time_ns = now_ns () in
|
||||
|
||||
(* get the common trace id, or make a new one *)
|
||||
let trace_id =
|
||||
let trace_id, parent =
|
||||
match parent with
|
||||
| Some m -> Meta_map.find_exn key_async_trace_id m.meta
|
||||
| None -> A.fetch_and_add trace_id_gen_ 1
|
||||
| Some m -> Meta_map.find_exn key_async_trace_id m.meta, Some m.span
|
||||
| None -> A.fetch_and_add trace_id_gen_ 1, None
|
||||
in
|
||||
|
||||
CB.on_enter_manual_span st ~__FUNCTION__ ~__FILE__ ~__LINE__ ~parent ~data
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue