From 66816040aa6b3b1e0e2ff6fcf6ed7f8a6bd8c018 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 15 Jan 2026 17:19:49 -0500 Subject: [PATCH] core: remove `current_span` from collector probably orthogonal, collectors can provide this optionally via ambient-context if desired. doesn't need to be in the Trace_core collector itself. --- src/core/collector.ml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/core/collector.ml b/src/core/collector.ml index 7075d10..1e00319 100644 --- a/src/core/collector.ml +++ b/src/core/collector.ml @@ -28,10 +28,6 @@ module Callbacks = struct exit_span: 'st -> span -> unit; (** Exit a span. Must be called exactly once per span. Additional constraints on nesting, threads, etc. vary per collector. *) - current_span: 'st -> span option; - (** Access the current span, if supported. Returns [None] if there is no - current span or if the current span isn't tracked by the collector. - *) add_data_to_span: 'st -> span -> (string * user_data) list -> unit; message: 'st -> @@ -66,14 +62,12 @@ module Callbacks = struct (** Callbacks taking a state ['st] *) (** Helper to create backends in a future-proof way *) - let make ~enter_span ~exit_span ?(current_span = fun _ -> None) - ~add_data_to_span ~message ~counter_int ~counter_float - ?(extension = fun _ _ -> ()) ?(init = ignore) ?(shutdown = ignore) () : - _ t = + let make ~enter_span ~exit_span ~add_data_to_span ~message ~counter_int + ~counter_float ?(extension = fun _ _ -> ()) ?(init = ignore) + ?(shutdown = ignore) () : _ t = { enter_span; exit_span; - current_span; add_data_to_span; message; counter_int;