Observability π‘ BETA
Use this runbook to inspect logs and metrics from the running stack and to change their retention or verbosity without changing application code.
When to use
- An incident is in progress and you need the component logs or a metric baseline.
- You want to lower log volume or verify that the metric endpoint still works.
- Do not use it to invent thresholds; measure first, then change configuration.
Before you start
| Item | Authority |
|---|---|
| Log locations | Root AGENTS.md: botserver.log, botui.log, drive-monitor lines prefixed [drive_monitor], client errors prefixed CLIENT:. |
| Component logs | botserver-stack/logs/ with one subdirectory per component. |
| Pipeline configuration | Vector configuration under botserver-stack/conf/. |
| Component version | botserver/3rdparty.toml (vector component). |
| Access | A Bearer token for the read-only metric endpoints. |
Never paste credentials or internal IPs into a log or a page.
Steps
- Confirm the collector is running and can read the log directories.
- Search the relevant log, for example
grep -E ' E | W ' botserver.log | tail -20, and read the component subdirectory for storage, cache, directory or mail issues. - Scrape the canonical endpoint
GET /metrics(text/plain; version=0.0.4); the legacyGET /api/metricsremains available. Both are read-onlyGETpermissions in the RBAC route catalogue. - Adjust log level only when volume is a problem: a higher minimum severity reduces output. Retention belongs in the collector configuration, not in prose.
Verify
| Check | Expected result |
|---|---|
| Metric endpoint | GET /metrics returns numeric series with a Bearer token. |
| Log routing | Errors appear in the alert path; informational messages reach long-term storage. |
| No sensitive fields | No token, password or personal identifier is present in the emitted lines. |
| Component health | GET /health returns 200 and the collector process is running. |
Metrics Collection
Both metric endpoints expose the same series. botserver/crates/botcore/src/shared/analytics/ defines the collector and the office instrumentation; the browser marks carry no document content or user, tenant or file ids.
| Metric family | Meaning |
|---|---|
office_recalc_duration_ms_{count,sum,max} |
Spreadsheet recalculations observed and their duration in milliseconds. |
office_export_duration_ms_{count,sum,max} |
Office export operations observed and their duration in milliseconds. |
office_workbook_memory_bytes |
Resident memory per workbook; the label is an opaque hash. |
http_request_duration_ms_{count,sum,max} |
HTTP requests observed per route and their latency. |
The series also include log event counts by severity, error totals by service, active sessions, messages processed and LLM latency.
Roll back
- Restore the previous log level and collector configuration from a copy kept outside the repository.
- Restart only the collector, then re-run the Verify table.
- If an alert is noisy, remove the rule rather than raising a threshold copied from another environment.
Limits
| Claim | Status |
|---|---|
| Grafana dashboard template | Not asserted as shipped; do not promise an importable dashboard. |
CPU, memory and response-time thresholds in config.csv |
Not asserted; no such keys are verified here. |
| Log format precision | Not asserted; read the logger configuration before quoting a format. |
| Retention period | Set by the collector configuration, not by this page. |
Related
- Scaling β using the baseline for capacity changes.
- Infrastructure β where the logs are mounted.