mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
subscriber: make ~new_span_id mandatory
too easy to forget otherwise
This commit is contained in:
parent
7a392e54d1
commit
322e1d0f44
2 changed files with 4 additions and 2 deletions
|
|
@ -88,7 +88,7 @@ end
|
||||||
|
|
||||||
(** Build a set of callbacks.
|
(** Build a set of callbacks.
|
||||||
@since NEXT_RELEASE *)
|
@since NEXT_RELEASE *)
|
||||||
let make ?(on_init = Dummy.on_init) ?(new_span_id = Dummy.new_span_id)
|
let make ~new_span_id ?(on_init = Dummy.on_init)
|
||||||
?(on_enter_span = Dummy.on_enter_span) ?(on_exit_span = Dummy.on_exit_span)
|
?(on_enter_span = Dummy.on_enter_span) ?(on_exit_span = Dummy.on_exit_span)
|
||||||
?(on_message = Dummy.on_message) ?(on_counter = Dummy.on_counter)
|
?(on_message = Dummy.on_message) ?(on_counter = Dummy.on_counter)
|
||||||
?(on_extension_event = Dummy.on_extension_event)
|
?(on_extension_event = Dummy.on_extension_event)
|
||||||
|
|
@ -105,4 +105,4 @@ let make ?(on_init = Dummy.on_init) ?(new_span_id = Dummy.new_span_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
(** Dummy callbacks, ignores all events. *)
|
(** Dummy callbacks, ignores all events. *)
|
||||||
let dummy () : _ t = make ()
|
let dummy () : _ t = make ~new_span_id:(fun () -> Span_sub.dummy_span_id) ()
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ open Trace_core
|
||||||
type span_id = int64
|
type span_id = int64
|
||||||
(** Unique ID *)
|
(** Unique ID *)
|
||||||
|
|
||||||
|
let dummy_span_id = Int64.min_int
|
||||||
|
|
||||||
type span_flavor =
|
type span_flavor =
|
||||||
[ `Sync
|
[ `Sync
|
||||||
| `Async
|
| `Async
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue