Console
Console Sink
Overview
The Console sink enables Worker to emit observability events directly to the process console. Events are written to standard output or standard error and are not persisted. This makes the Console sink primarily a diagnostic and development tool rather than a production storage destination.
It is commonly used to observe the shape of events after parsing and transformation, verify routing logic, and debug pipelines before enabling external sinks such as databases or cloud services.
Supported Input Types
This sink supports logs, metrics, and traces.
Core Configuration Parameters
Target (optional) Controls which standard stream events are written to. Events can be written either to standard output or standard error. Writing to standard error is useful when separating debug output from normal application output, or when relying on runtime environments that treat stderr differently.
Encoding (required) Controls how events are serialized before being printed to the console. Encoding determines whether events are displayed as structured JSON, plain text, logfmt, or other supported formats.
This setting is the most important aspect of the Console sink, as it defines how readable and useful the output will be during debugging. JSON encoding is commonly used when inspecting full event structure, while text-based formats are useful for quick human inspection.
Buffering and Backpressure
Buffer (optional) Controls how events are buffered before being written to the console. Although the sink writes locally, console I/O can become a bottleneck at high event rates, especially when printing large structured payloads.
Buffering allows worker to absorb short bursts of events without immediately blocking upstream components. Memory buffering provides higher performance, while disk buffering provides greater durability at the cost of throughput.
When buffers are full, behavior can be tuned to either apply backpressure upstream or intentionally drop newer events, depending on whether correctness or throughput is the priority during debugging.
Framing Behavior
Framing (optional) Controls how individual events are delimited when written to the console. Proper framing ensures that each event is clearly separated, which is important when console output is collected by container runtimes, journald, or log aggregation systems.
Newline-delimited output is commonly used so that each event appears as a single line or logical record.
Common Usage Patterns
The Console sink is most often used during development and troubleshooting phases.
It is commonly used to validate transform logic by inspecting events after remap operations, to verify routing decisions when using conditional pipelines, and to inspect timestamps, field names, and schemas before enabling downstream sinks.
In complex pipelines, the Console sink is often used temporarily as a “tap” to observe live traffic without modifying the rest of the pipeline.