class

Tracing::Core::Dispatch

Inherits Reference < Object

A Dispatch wraps a Subscriber and provides the interface for dispatching trace data.

Constructors

new(subscriber : Subscriber | Nil = nil)
Source

Class methods

current

Get the currently active dispatch (fiber-local first, then global).

Source
default
Source
global_default=(dispatch : Dispatch) : Nil

Set the global default dispatch. Triggers callsite interest cache rebuild. Returns true on success, false if already set.

Source
has_been_set?
Source
try_close
Source
with_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

Source

Instance methods

clone_span(id : Core::Span::Id) : Core::Span::Id
Source
current_span
Source
drop_span(id : Core::Span::Id) : Nil
Source
enabled(metadata : Metadata) : Bool
Source
enter(id : Span::Id) : Nil
Source
event(event : Event) : Nil
Source
exit(id : Span::Id) : Nil
Source
max_level_hint
Source
new_span(attrs : Span::Attributes) : Span::Id
Source
on_register_dispatch
Source
record(id : Span::Id, values : Span::Record) : Nil
Source
record_follows_from(span : Span::Id, follows : Span::Id) : Nil
Source
register_callsite(metadata : Metadata) : Callsite::Interest
Source
subscriber
Source
try_close(id : Core::Span::Id) : Bool
Source