fix otel.trace: set scope for explicit spans

This commit is contained in:
Simon Cruanes 2024-10-25 10:44:32 -04:00
parent 5aa5c5ed0a
commit fdee7fe2dd
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -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