docs: update for log forwarding v2 (source field, wire format)
HOWTO.md: log ingestion example updated from LogBatch wrapper to raw JSON array with source field. CLAUDE.md: added LogIngestionController, updated LogQueryController with new filters. SERVER-CAPABILITIES.md: updated log ingestion and query descriptions, ClickHouse table note. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
19
HOWTO.md
19
HOWTO.md
@@ -242,19 +242,18 @@ curl -s -X POST http://localhost:8081/api/v1/data/metrics \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-d '[{"agentId":"agent-1","metricName":"cpu","value":42.0,"timestamp":"2026-03-11T00:00:00Z","tags":{}}]'
|
||||
|
||||
# Post application log entries (batch)
|
||||
# Post application log entries (raw JSON array — no wrapper)
|
||||
curl -s -X POST http://localhost:8081/api/v1/data/logs \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-d '{
|
||||
"entries": [{
|
||||
"timestamp": "2026-03-25T10:00:00Z",
|
||||
"level": "INFO",
|
||||
"loggerName": "com.acme.MyService",
|
||||
"message": "Processing order #12345",
|
||||
"threadName": "main"
|
||||
}]
|
||||
}'
|
||||
-d '[{
|
||||
"timestamp": "2026-03-25T10:00:00Z",
|
||||
"level": "INFO",
|
||||
"loggerName": "com.acme.MyService",
|
||||
"message": "Processing order #12345",
|
||||
"threadName": "main",
|
||||
"source": "app"
|
||||
}]'
|
||||
```
|
||||
|
||||
**Note:** The `X-Protocol-Version: 1` header is required on all `/api/v1/data/**` endpoints. Missing or wrong version returns 400.
|
||||
|
||||
Reference in New Issue
Block a user