> ## Documentation Index
> Fetch the complete documentation index at: https://onr.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Observability

> Logs, traffic dump, and usage/cost extraction.

## Access log

ONR emits one-line request logs. Common fields include:

* `request_id`, `status`, `latency_ms`, `method`, `path`, `client_ip`
* routing (when available): `api`, `provider`, `provider_source`, `model`, `stream`
* upstream (when available): `upstream_status`, `finish_reason`
* usage/cost (when enabled and extractable): token fields and cost breakdown

See [AppName](/concepts/appname) for how the `appname` field is resolved.

## Dashboards

ONR includes an optional Grafana + Loki + Promtail stack and a prebuilt access-log dashboard.

See [Dashboards](/concepts/dashboards) for setup and notes on label cardinality.

## Access log format

If you use a custom `logging.access_log_format`, see [Access Log Fields](/reference/access-log-fields) for the full variable list and semantics.

## Traffic dump (file-based)

Enable file-based dumps for debugging:

* `traffic_dump.enabled` / `ONR_TRAFFIC_DUMP_ENABLED`
* `traffic_dump.dir` / `ONR_TRAFFIC_DUMP_DIR`
* `traffic_dump.file_path` / `ONR_TRAFFIC_DUMP_FILE_PATH` (template supports `{{.request_id}}`)
* `traffic_dump.max_bytes` / `ONR_TRAFFIC_DUMP_MAX_BYTES`
* `traffic_dump.mask_secrets` / `ONR_TRAFFIC_DUMP_MASK_SECRETS`
* `traffic_dump.sections` / `ONR_TRAFFIC_DUMP_SECTIONS` (comma-separated allowlist; empty means all sections)

Captured sections (default: all; configurable via `traffic_dump.sections`):

* `META`
* `ORIGIN REQUEST`
* `UPSTREAM REQUEST`
* `UPSTREAM RESPONSE`
* `PROXY RESPONSE`
* `STREAM`
