APGAR_ at startup. Settings that change at runtime live in the database and are edited in Settings.
In the Compose stack, set them in .env next to the Compose file and apply a change with docker compose up -d; docker compose restart does not read .env again. Compose sets the APGAR_CLICKHOUSE_ variables itself, so values for them in .env have no effect. To use another ClickHouse server, set them in docker-compose.override.yml.
With the Helm chart, set them under env in the values, and take secrets from a Secret with envFrom. Apply a change with helm upgrade. The chart sets the APGAR_CLICKHOUSE_ variables, APGAR_SECRET_KEY, APGAR_ADMIN_TOKEN, APGAR_PUBLIC_URL, and APGAR_TRUSTED_PROXY_HOPS from its own values, so set those there and not under env. See Kubernetes.
Required
A process with a missing or short value prints the reason and exits with code 2.
Environment variables
Worker
Runtime settings
Retention
Settings, General controls how long data is kept, in days:
The minimum of 21 days covers the 7 day baseline before a release, up to 7 days of monitoring, and 7 more days of conversation history. Verdict history cannot be shorter than trace data, because it is the record that remains after traces are deleted. Release rows and release events are never deleted by retention. A release whose traces have left retention cannot be evaluated again. A daily job applies the values.
Other settings
- General: turn the usage report on or off.
APGAR_TELEMETRY=0wins over this toggle. One Save applies it together with the retention values. - Agents: per agent verdict rules and metric settings.
Access
The UI signs in withAPGAR_ADMIN_TOKEN and keeps a session cookie, apgar_session, for 24 hours. The cookie is HttpOnly and SameSite=Strict, and Secure when APGAR_COOKIE_SECURE is true or the request arrives with X-Forwarded-Proto: https. Ten failed sign ins from one address within a minute return 429 until the minute has passed.
The API under /api/v1 serves the UI. It is not a stable public interface. It accepts the session cookie or Authorization: Bearer APGAR_ADMIN_TOKEN. A request authorized by the cookie that is not GET or HEAD must also carry X-Apgar-Request: 1, which the UI adds; a bearer token needs no extra header. Ingest tokens work only on /v1/traces.
Rotating APGAR_SECRET_KEY signs out every session. The admin token is independent of the secret key; change it by setting a new value and restarting.