class LittleGhost::Instrumentation::Subscriber
Subclass Subscriber to connect a telemetry backend.
Override the callbacks a backend supports. start and finish receive the same operation name and correlated attributes. emit receives point events. Implementations may return a propagation carrier from trace_context. Callbacks should be thread-safe.
Public Instance Methods
Source
# File lib/little_ghost/instrumentation.rb, line 43 def emit(_name, _attributes) = nil
Called for a point-in-time instrumentation event.
Source
# File lib/little_ghost/instrumentation.rb, line 41 def finish(_name, _attributes) = nil
Called when a lifecycle operation finishes.
Source
# File lib/little_ghost/instrumentation.rb, line 45 def flush(timeout: nil) = nil
Flushes buffered telemetry within an optional timeout budget.
Source
# File lib/little_ghost/instrumentation.rb, line 47 def shutdown(timeout: nil) = nil
Releases subscriber resources within an optional timeout budget.
Source
# File lib/little_ghost/instrumentation.rb, line 39 def start(_name, _attributes) = nil
Called when a lifecycle operation starts.
Source
# File lib/little_ghost/instrumentation.rb, line 49 def trace_context(**) = {}
Supplies trace fields that should travel with downstream work.