System
Metrics
Scrape Prometheus-compatible metrics from the Blnk server and worker processes.
GET
/
metrics
curl -X GET "http://localhost:5001/metrics" \
-H "Authorization: Bearer <metrics-bearer-token>"
curl -X GET "http://localhost:5004/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
See Health check for the same server/worker split on
When authentication fails, responses use structured JSON errors. See API error codes for
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.
| Endpoint | Process | Port setting | Default URL |
|---|---|---|---|
GET /metrics | Server | server.port | http://localhost:5001/metrics |
GET /metrics | Worker | queue.monitoring_port | http://localhost:5004/metrics |
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.
string
Bearer token when required. Format:
Bearer <metrics-bearer-token>.curl -X GET "http://localhost:5001/metrics" \
-H "Authorization: Bearer <metrics-bearer-token>"
curl -X GET "http://localhost:5004/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
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.Was this page helpful?
⌘I
curl -X GET "http://localhost:5001/metrics" \
-H "Authorization: Bearer <metrics-bearer-token>"
curl -X GET "http://localhost:5004/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