Skip to main content
GET
/
metrics
curl -X GET "http://localhost:5001/metrics" \
  -H "Authorization: Bearer <metrics-bearer-token>"
# HELP blnk_transaction_total Total transactions by final status and currency
# TYPE blnk_transaction_total counter
blnk_transaction_total{currency="USD",status="APPLIED"} 128
Returns OpenTelemetry metrics in Prometheus text format. Requires enable_observability to be true on each process you scrape. See Metrics reference for metric names, types, and attributes. Blnk runs the server and worker as separate processes. Each registers its own GET /metrics endpoint on a different port. The path is the same, but the series differ — scrape both targets in Prometheus to capture API and async processing signals.
EndpointProcessPort settingDefault URL
GET /metricsServerserver.porthttp://localhost:5001/metrics
GET /metricsWorkerqueue.monitoring_porthttp://localhost:5004/metrics
See Health check for the same server/worker split on GET /health.
When observability is disabled, or the process was not restarted after enabling it, GET /metrics returns 404.

Authentication

/metrics uses Authorization: Bearer <token>, not X-Blnk-Key. When metrics_bearer_token is set, or secure mode is on without a token configured, bearer authentication applies. See Metrics endpoint.
Authorization
string
Bearer token when required. Format: Bearer <metrics-bearer-token>.
curl -X GET "http://localhost:5001/metrics" \
  -H "Authorization: Bearer <metrics-bearer-token>"
# HELP blnk_transaction_total Total transactions by final status and currency
# TYPE blnk_transaction_total counter
blnk_transaction_total{currency="USD",status="APPLIED"} 128
When authentication fails, responses use structured JSON errors. See API error codes for AUTH_METRICS_TOKEN_REQUIRED, AUTH_INVALID_BEARER_TOKEN, and AUTH_METRICS_DISABLED.
401 Unauthorized
{
  "error": "metrics bearer token required",
  "error_detail": {
    "code": "AUTH_METRICS_TOKEN_REQUIRED",
    "message": "metrics bearer token required",
    "details": {}
  }
}

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.