Skip to content

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.

The Admin guide path: install, secure, configure and operate the server.

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

  1. Confirm the collector is running and can read the log directories.
  2. 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.
  3. Scrape the canonical endpoint GET /metrics (text/plain; version=0.0.4); the legacy GET /api/metrics remains available. Both are read-only GET permissions in the RBAC route catalogue.
  4. 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

  1. Restore the previous log level and collector configuration from a copy kept outside the repository.
  2. Restart only the collector, then re-run the Verify table.
  3. 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.
  • Scaling β€” using the baseline for capacity changes.
  • Infrastructure β€” where the logs are mounted.