Logs, metrics and health checks
Health checks
| Path | Answers | Use it for |
|---|---|---|
/healthz | ok while the process is up | Liveness |
/readyz | 200 with {"status":"ok","checks":{"database":"ok","storage":"ok","keys":"ok"}} when it can serve; 503 with "failing" for the check that isn’t | Readiness, load balancers, uptime monitors |
/api/v1/version | {"version":"1.0.0","protocol":2} | Checking which release is running |
/readyz checks that the database answers with every migration applied, that the object store
answers, and, with OpenBao or Vault, that the key source works. Each check has three seconds. It
says which check failed, never why: the reason is in the server’s log, as a warning naming the
check.
Logs
Logs go to stderr, as JSON by default (one object per line, for log collectors):
[telemetry]
log_format = "pretty" # for people reading a terminal; "json" is the default
RUST_LOG sets the level, as info (the default), debug, or per module:
RUST_LOG=info,drusite_server::sync=debug.
No note text is logged, and AI providers’ errors are logged as a category, never with the
provider’s message, which can quote the request. Authorization, Cookie and DPoP headers are
marked sensitive and left out of traces. Every request gets an X-Request-Id,
echoed in the response and the log, so a person can quote it when something fails.
Traces, metrics and logs over OTLP
Set the standard OpenTelemetry variables and the server sends traces, metrics and logs to any OTLP/HTTP backend (an OpenTelemetry Collector, Grafana Alloy, Jaeger, Tempo, Honeycomb, …):
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector.example.test:4318
OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer%20TOKEN
[telemetry]
service_name = "drusite-server" # service.name in everything it sends
# otlp = false # off, whatever the variables say
Incoming W3C traceparent headers are honoured, so a trace can start at your proxy. The server
records http.server.request.duration for every request, by route and status.
What to watch
/readyzfrom outside, through your proxy.- Warnings in the log:
readiness check failed(with the check’s name), and errors from the background jobs (search indexing, meetings, deleting old workspaces). - PostgreSQL’s disk and connections, and the bucket’s size.
- Certificate expiry on your proxy.