trace: expose the OTEL span

This commit is contained in:
Simon Cruanes 2026-02-19 15:29:56 -05:00
parent 4387bf8287
commit cb53b54b00
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,8 @@
open Common_
module Extensions = struct
type Otrace.span += Span_otel of OTEL.Span.t
type Otrace.extension_event +=
| Ev_link_span of Otrace.span * OTEL.Span_ctx.t
| Ev_record_exn of {
@ -19,10 +21,6 @@ end
open Extensions
open struct
type Otrace.span += Span_otel of OTEL.Span.t
end
open struct
type state = {
clock: Opentelemetry_core.Clock.t;

View file

@ -21,6 +21,9 @@ module Otrace := Trace_core
(** The extension events for {!Trace_core}. *)
module Extensions : sig
type Otrace.span +=
| Span_otel of OTEL.Span.t (** The type of span used for OTEL *)
type Otrace.extension_event +=
| Ev_link_span of Otrace.span * OTEL.Span_ctx.t
(** Link the given span to the given context. The context isn't the