docs(observability): document phase-0 telemetry and baseline workflow

This commit is contained in:
William Valentin
2026-02-25 09:22:56 -08:00
parent 0b8f7c7299
commit 8b5266c66c
8 changed files with 179 additions and 1 deletions
+53
View File
@@ -352,6 +352,59 @@ Useful for proactive compaction monitoring and operator dashboards.
}
```
#### `system.metrics`
Return aggregated gateway metrics snapshot (used by the dashboard).
Includes run-state counters, cancel latency samples, and reaction decision counters.
**Request:**
```json
{
"id": 11,
"method": "system.metrics"
}
```
**Response:**
```json
{
"id": 11,
"result": {
"messagesProcessed": 120,
"errors": 2,
"activeRequests": 1,
"uptime": 3600,
"modelCalls": {
"total": 15,
"avgLatency": 420,
"errorRate": 0.07,
"recentCalls": []
},
"runStates": {
"start": 25,
"complete": 22,
"cancel_requested": 1,
"cancelled": 1,
"error": 1
},
"cancelLatencyMs": {
"sampleCount": 4,
"samples": [120, 240, 310, 95]
},
"reactions": {
"matched": 6,
"skipped": 3,
"skipReasons": {
"no_match": 2,
"no_rules": 1
}
},
"queueDepth": 0
}
}
```
#### `system.localBackends`
Return status for user-level local LLM backend daemons (for example `ollama.service` and `llama-server.service`).