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:
@@ -85,7 +85,8 @@ java -jar cameleer3-server-app/target/cameleer3-server-app-1.0-SNAPSHOT.jar
|
|||||||
- `EnvironmentAdminController` — CRUD /api/v1/admin/environments, PUT /{id}/jar-retention
|
- `EnvironmentAdminController` — CRUD /api/v1/admin/environments, PUT /{id}/jar-retention
|
||||||
- `ExecutionController` — GET /api/v1/executions (search + detail)
|
- `ExecutionController` — GET /api/v1/executions (search + detail)
|
||||||
- `SearchController` — POST /api/v1/search, GET /routes, GET /top-errors, GET /punchcard
|
- `SearchController` — POST /api/v1/search, GET /routes, GET /top-errors, GET /punchcard
|
||||||
- `LogQueryController` — GET /api/v1/logs, GET /tail
|
- `LogQueryController` — GET /api/v1/logs (filters: source, application, agentId, exchangeId, level, logger, q, environment, time range)
|
||||||
|
- `LogIngestionController` — POST /api/v1/data/logs (accepts `List<LogEntry>` JSON array, each entry has `source`: app/agent)
|
||||||
- `ChunkIngestionController` — POST /api/v1/ingestion/chunk/{executions|metrics|diagrams}
|
- `ChunkIngestionController` — POST /api/v1/ingestion/chunk/{executions|metrics|diagrams}
|
||||||
- `UserAdminController` — CRUD /api/v1/admin/users, POST /{id}/roles, POST /{id}/set-password
|
- `UserAdminController` — CRUD /api/v1/admin/users, POST /{id}/roles, POST /{id}/set-password
|
||||||
- `RoleAdminController` — CRUD /api/v1/admin/roles
|
- `RoleAdminController` — CRUD /api/v1/admin/roles
|
||||||
|
|||||||
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" \
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
-d '[{"agentId":"agent-1","metricName":"cpu","value":42.0,"timestamp":"2026-03-11T00:00:00Z","tags":{}}]'
|
-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 \
|
curl -s -X POST http://localhost:8081/api/v1/data/logs \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Authorization: Bearer $TOKEN" \
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
-d '{
|
-d '[{
|
||||||
"entries": [{
|
"timestamp": "2026-03-25T10:00:00Z",
|
||||||
"timestamp": "2026-03-25T10:00:00Z",
|
"level": "INFO",
|
||||||
"level": "INFO",
|
"loggerName": "com.acme.MyService",
|
||||||
"loggerName": "com.acme.MyService",
|
"message": "Processing order #12345",
|
||||||
"message": "Processing order #12345",
|
"threadName": "main",
|
||||||
"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.
|
**Note:** The `X-Protocol-Version: 1` header is required on all `/api/v1/data/**` endpoints. Missing or wrong version returns 400.
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ All ingestion endpoints require JWT with `AGENT` role.
|
|||||||
| `POST /api/v1/data/executions` | Execution chunks (route + processor traces) | Buffered, flushed periodically |
|
| `POST /api/v1/data/executions` | Execution chunks (route + processor traces) | Buffered, flushed periodically |
|
||||||
| `POST /api/v1/data/diagrams` | Route graph definitions | Single or array |
|
| `POST /api/v1/data/diagrams` | Route graph definitions | Single or array |
|
||||||
| `POST /api/v1/data/events` | Agent lifecycle events | Triggers registry state transitions |
|
| `POST /api/v1/data/events` | Agent lifecycle events | Triggers registry state transitions |
|
||||||
| `POST /api/v1/data/logs` | Application log batches | Buffered, 503 if buffer full |
|
| `POST /api/v1/data/logs` | Log entries (JSON array, `source`: app/agent) | Buffered, 503 if buffer full |
|
||||||
| `POST /api/v1/data/metrics` | Metrics snapshots | Buffered, 503 if buffer full |
|
| `POST /api/v1/data/metrics` | Metrics snapshots | Buffered, 503 if buffer full |
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -187,7 +187,7 @@ All query endpoints require JWT with `VIEWER` role or higher.
|
|||||||
|
|
||||||
| Endpoint | Description |
|
| Endpoint | Description |
|
||||||
|----------|-------------|
|
|----------|-------------|
|
||||||
| `GET /api/v1/logs` | Cursor-based log search with level aggregation |
|
| `GET /api/v1/logs` | Cursor-based log search with level aggregation. Filters: `source` (app/agent), `application`, `agentId`, `exchangeId`, `level`, `logger`, `q` (text), `environment`, time range |
|
||||||
|
|
||||||
### Diagrams
|
### Diagrams
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ Used for all observability data. Schema managed by `ClickHouseSchemaInitializer`
|
|||||||
| `processor_executions` | MergeTree | Per-processor trace data | 365d |
|
| `processor_executions` | MergeTree | Per-processor trace data | 365d |
|
||||||
| `agent_events` | MergeTree | Agent lifecycle audit trail | 365d |
|
| `agent_events` | MergeTree | Agent lifecycle audit trail | 365d |
|
||||||
| `route_diagrams` | ReplacingMergeTree | Route graph definitions | - |
|
| `route_diagrams` | ReplacingMergeTree | Route graph definitions | - |
|
||||||
| `logs` | MergeTree | Application logs | 365d |
|
| `logs` | MergeTree | Application + agent logs (`source` column: app/agent, `mdc` Map) | 365d |
|
||||||
| `usage_events` | MergeTree | UI action tracking | 90d |
|
| `usage_events` | MergeTree | UI action tracking | 90d |
|
||||||
| `stats_1m_all` | AggregatingMergeTree | Global 1-minute rollups | - |
|
| `stats_1m_all` | AggregatingMergeTree | Global 1-minute rollups | - |
|
||||||
| `stats_1m_app` | AggregatingMergeTree | Per-application rollups | - |
|
| `stats_1m_app` | AggregatingMergeTree | Per-application rollups | - |
|
||||||
|
|||||||
Reference in New Issue
Block a user