---
title: "Metrics settings"
summary: "Settings for the Prometheus scrape endpoint at /metrics."
description: "The Prometheus endpoint's token and whether it is public."
status: preview
generated: true
read_when:
  - "You are scraping Fanout's own metrics."
---

Every setting below is read once at startup and requires a restart to change.
Built-in defaults are overridden by nonempty environment values.
Unknown `FANOUT_` names fail startup; platform-injected service names are tolerated.
Vendor credentials and endpoints keep the vendor's documented names.

| Environment variable | Type | Default |
|---|---|---|
| `FANOUT_METRICS_PUBLIC` | boolean | `false` |
| `FANOUT_METRICS_TOKEN` or `FANOUT_METRICS_TOKEN_FILE` | string · secret | — |

## Notes

### `FANOUT_METRICS_PUBLIC`

Allows unauthenticated Prometheus scrapes.

### `FANOUT_METRICS_TOKEN`

Authorizes Prometheus scrapes with a bearer token; optional when using an admin session.

> **Secrets**
>
> Settings marked `secret` are redacted from Fanout's startup configuration
> log. Supply either the value or its `_FILE` path, never both. File contents
> lose exactly one trailing newline (LF or CRLF); empty secrets fail startup.
