Tracing::Core::Dispatch
A Dispatch wraps a Subscriber and provides the interface for dispatching trace data.
Constructors
new(subscriber : Subscriber | Nil = nil)
SourceClass methods
default
Sourceglobal_default=(dispatch : Dispatch) : Nil
Set the global default dispatch. Triggers callsite interest cache rebuild. Returns true on success, false if already set.
has_been_set?
Sourcetry_close
Sourcewith_default(dispatch : Dispatch, & : -> T) : T forall T
Temporarily set this dispatch as the default for the current fiber.
Usage: Dispatch.with_default(my_dispatch) do # my_dispatch is the default here end
Instance methods
clone_span(id : Core::Span::Id) : Core::Span::Id
Sourcecurrent_span
Sourcedrop_span(id : Core::Span::Id) : Nil
Sourceenter(id : Span::Id) : Nil
Sourceevent(event : Event) : Nil
Sourceexit(id : Span::Id) : Nil
Sourcemax_level_hint
Sourcenew_span(attrs : Span::Attributes) : Span::Id
Sourceon_register_dispatch
Sourcerecord(id : Span::Id, values : Span::Record) : Nil
Sourcerecord_follows_from(span : Span::Id, follows : Span::Id) : Nil
Sourceregister_callsite(metadata : Metadata) : Callsite::Interest
Sourcesubscriber
Source