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. Calls may overlap on threads or fibers, so implementations must protect shared mutable state without relying on thread identity.
Public Instance Methods
Source
# File lib/little_ghost/instrumentation.rb, line 44 def emit(_name, _attributes) = nil
Called for a point-in-time instrumentation event.
Source
# File lib/little_ghost/instrumentation.rb, line 42 def finish(_name, _attributes) = nil
Called when a lifecycle operation finishes.
Source
# File lib/little_ghost/instrumentation.rb, line 46 def flush(timeout: nil) = nil
Flushes buffered telemetry within an optional timeout budget.
Source
# File lib/little_ghost/instrumentation.rb, line 48 def shutdown(timeout: nil) = nil
Releases subscriber resources within an optional timeout budget.
Source
# File lib/little_ghost/instrumentation.rb, line 40 def start(_name, _attributes) = nil
Called when a lifecycle operation starts.
Source
# File lib/little_ghost/instrumentation.rb, line 50 def trace_context(**) = {}
Supplies trace fields that should travel with downstream work.