Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Logging and metrics settings

The [logging] and [metrics] sections: log level and format, and where Prometheus metrics are served.

Synopsis

[logging]
level = "info"
format = "pretty"

[metrics]
enabled = false
# bind_addr = …   # no default

Description

That listener is plain HTTP (server.tls governs the main listener only) and has no authentication by design. The address is the access control, so bind it somewhere only your scrapers can reach. Startup logs a warning if it is not a loopback address. It logs another if bind_addr is set while metrics.enabled is false, because that combination serves /metrics nowhere at all. It joins the same graceful-shutdown path as the main listener, keeping the last scrape of a draining node available for server.shutdown_drain_secs.

Options

SettingDefaultEnv varWhen to change
logging.level"info"ORION_LOGGING__LEVELtrace, debug, info, warn, error. RUST_LOG=orion=debug gives per-crate control.
logging.format"pretty"ORION_LOGGING__FORMATjson wherever logs are collected by anything other than a human.
metrics.enabledfalseORION_METRICS__ENABLEDEnable to collect metrics and serve them at GET /metrics. With this off the route is not registered at all: /metrics answers 404 rather than 200 with a permanently empty body.
metrics.bind_addrORION_METRICS__BIND_ADDRA dedicated host:port for an unauthenticated listener serving only GET /metrics. Unset keeps the endpoint on the main listener, where admin_auth guards it. Requires metrics.enabled = true; set on its own it raises no listener and startup warns. Refused at startup if it would contend with server.host/server.port — same port counts as contention whenever either side is a wildcard address.

Where /metrics is served. By default it lives on the main listener. With admin_auth.enabled = true every scraper must then hold an admin API key, a credential that can also rewrite workflows and read trace payloads. Setting metrics.bind_addr moves the endpoint onto its own listener, removes it from the main one entirely, and drops the credential requirement:

[metrics]
enabled = true
bind_addr = "127.0.0.1:9090"     # or a pod IP / a private Compose network

Last verified 14 September 2026