SSE streams
The engine pushes new records to the app over Server-Sent Events. Any client can open the same streams.
| Path | Event payload |
|---|---|
GET /api/logs/stream |
One log record per event. |
GET /api/traces/stream |
One span per event. |
GET /api/metrics/stream |
One data point per event. |
GET /api/alerts/stream |
One fired alert per event. |
Open a stream
Section titled “Open a stream”curl -N "http://127.0.0.1:54321/api/logs/stream"Each event is one line of JSON after data:. The connection stays open until the client closes it. The engine sends a comment line at intervals to keep the connection alive.
Filters
Section titled “Filters”The log stream accepts the same filters as GET /api/logs: severity, service, and collectorId. Add them to the query string.
Use in a script
Section titled “Use in a script”curl -N "http://127.0.0.1:54321/api/logs/stream?severity=ERROR" \ | sed -n 's/^data: //p' \ | jq -r '.body'