mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-14 14:36:20 -04:00
(- fix) Propagate force_new_trace_id in lwt with_
This commit is contained in:
parent
f5be8e3c55
commit
dcf13581e5
1 changed files with 2 additions and 0 deletions
|
|
@ -51,12 +51,14 @@ module Trace = struct
|
|||
in
|
||||
let trace_id =
|
||||
match trace_id, scope with
|
||||
| _ when force_new_trace_id -> Trace_id.create ()
|
||||
| Some trace_id, _ -> trace_id
|
||||
| None, Some scope -> scope.trace_id
|
||||
| None, None -> Trace_id.create ()
|
||||
in
|
||||
let parent =
|
||||
match parent, scope with
|
||||
| _ when force_new_trace_id -> None
|
||||
| Some span_id, _ -> Some span_id
|
||||
| None, Some scope -> Some scope.span_id
|
||||
| None, None -> None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue