-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Implement non-blocking HTTP push to Loki.
Files to create
lb_common/handlers/loki_handler.py(new)
Key features
- Async HTTP POST to Loki push API (
/loki/api/v1/push) - Batching with configurable flush interval
- Non-blocking queue with overflow protection
- Automatic retry with exponential backoff
- Graceful fallback to file-only on errors
Loki push format
{
"streams": [{
"stream": {
"component": "runner",
"host": "target-1",
"run_id": "run-xxx"
},
"values": [
["1704547800000000000", "{\"level\":\"INFO\",...}"]
]
}]
}Acceptance criteria
- Non-blocking push (queue-based)
- Batching for efficiency
- Retry logic with backoff
- Falls back silently on failure
- Unit tests with mocked Loki
Milestone: M2 - Loki Push Integration
Issue: 2.1
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request