TelemetryProcessor¶
This docs was updated at: 2026-02-23
com.paragon.telemetry.processors.TelemetryProcessor ยท Class
Abstract base class for async telemetry event processors.
Provides queue-based event processing with background worker threads. Implementations override
.doProcess to handle events.
Key design principles:
- Fire-and-forget:
.processreturns immediately - Non-blocking: events are queued and processed asynchronously
- Graceful shutdown: flush pending events before termination
Methods¶
TelemetryProcessor¶
Creates a processor with default queue size (1000) and single worker thread.
TelemetryProcessor¶
Creates a processor with custom queue size and worker thread count.
process¶
Queues an event for async processing. Returns immediately without blocking (fire-and-forget).
Parameters
| Name | Description |
|---|---|
event |
the telemetry event to process |
doProcess¶
Processes an event. Implementations should handle the event according to their vendor-specific logic (e.g., send to Langfuse, Grafana).
This method is called on a background thread and should not block for extended periods.
Parameters
| Name | Description |
|---|---|
event |
the event to process |
processLoop¶
Background worker loop that consumes events from the queue.
flush¶
Flushes all pending events by waiting for the queue to drain. Blocks until all events are processed or timeout is reached.
Parameters
| Name | Description |
|---|---|
timeout |
max time to wait |
unit |
time unit |
Returns
true if all events were flushed, false if timeout
shutdown¶
Gracefully shuts down the processor. Attempts to flush pending events before termination.
getProcessorName¶
Returns the processor name for logging and identification.
getQueueSize¶
Returns the current queue size.
isRunning¶
Returns whether the processor is running.