Available sinks
| Sink | Use case |
|---|---|
HttpBatchSink | Send to Arzule cloud (production) |
JsonlFileSink | Write to local file (development) |
CompositeSink | Send to multiple destinations |
HttpBatchSink
Sends events to the Arzule ingest API in batches.Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
endpoint_url | str | Required | Ingest API URL |
api_key | str | Required | API key for authentication |
batch_size | int | 100 | Maximum events per batch |
flush_interval | float | 5.0 | Seconds between automatic flushes |
timeout | float | 30.0 | HTTP request timeout |
max_retries | int | 3 | Retry attempts for failed requests |
Automatic batching
Events are buffered and sent in batches for efficiency. A batch is sent when:batch_sizeevents have accumulatedflush_intervalseconds have passed- The run ends (explicit flush)
JsonlFileSink
Writes events to a local JSONL (JSON Lines) file. Each line is a complete JSON object.Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
path | str | Required | File path to write to |
append | bool | True | Append to existing file or overwrite |
Output format
Development workflow
UseJsonlFileSink during development, then view traces with the CLI:
CompositeSink
Sends events to multiple sinks simultaneously. Useful for:- Local debugging while sending to production
- Redundant storage
- Splitting traces between systems
Error handling
If one sink fails, others continue to receive events. Errors are logged but don’t stop the run.Custom sinks
Implement theBaseSink interface for custom destinations:
