Skip to content

Commit

Permalink
fix otel.trace: set scope for explicit spans
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Oct 25, 2024
1 parent 5aa5c5e commit fdee7fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/trace/opentelemetry_trace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ module Internal = struct
let active_spans = Active_spans.get () in
Active_span_tbl.add active_spans.tbl otrace_id sb;

Otrace.{ span = otrace_id; meta = Meta_map.empty }
Otrace.
{
span = otrace_id;
meta = Meta_map.(empty |> add k_explicit_scope sb.scope);
}

let exit_manual_span Otrace.{ span = otrace_id; _ } =
let active_spans = Active_spans.get () in
Expand Down

0 comments on commit fdee7fe

Please sign in to comment.