Skip to main content
GET
Prometheus metrics
The Prometheus scrape endpoint. It emits request counts and latency histograms per method, route and status; a counter of business events by type (the number to watch for “did billing run tonight”); database connection-pool gauges; and Go runtime gauges. The body is text/plain; version=0.0.4 — Prometheus text format, not JSON. Access is controlled by the METRICS_TOKEN environment variable. When it is set, the request must carry it as a bearer token; when it is unset the endpoint is open, on the assumption that you scrape from a trusted network. This is a deployment token, not a tenant API key — an API key is not accepted here. For a JSON health probe use Get Health; for the founder-only cross-tenant funnel use Get Platform Metrics.
The spec entry for this operation does not declare security: [], so the playground on this page inherits the document-level bearerAuth scheme and shows a tenant-API-key box. Ignore it: the handler compares the header against METRICS_TOKEN only, and a tenant API key is rejected with 401.

Example Request

Omit the header when METRICS_TOKEN is not configured.

Response

Prometheus text exposition format. The route label is the gin route template as registered, with colon-style parameters, so every /v1/customers/<uuid> request lands on the one series route="/v1/customers/:id" regardless of the ID. Requests that match no registered route (404s from typos, scanners) are labelled route="<unmatched>". The scrape of /metrics itself is not measured. Every histogram series carries all eleven configured buckets (0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10) plus +Inf; the sample below is what one series looks like in full.

Metric Families

The http_* and recurso_events_total families only list series that have been observed since the process started; the pool and runtime gauges are always present.

Errors

This endpoint does not use the error envelope.

Authorizations

Authorization
string
header
required

Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.

Response

Metrics in Prometheus text exposition format.

The response is of type string.