Blnk exposes OpenTelemetry metrics via a Prometheus-compatible /metrics endpoint. This document lists all available metrics, their types, attributes, and what they tell you operationally.
- Set
"enable_observability": trueinblnk.json(orBLNK_ENABLE_OBSERVABILITY=true) - Metrics are served on:
- Server:
GET /metricson the API port (default5001) - Worker:
GET /metricson the monitoring port (default5004)
- Server:
When server.secure is enabled, the /metrics endpoint requires a bearer token:
- Set
"metrics_bearer_token": "<your-token>"inblnk.json(orBLNK_METRICS_BEARER_TOKEN) - Configure Prometheus to send the token:
scrape_configs:
- job_name: 'blnk-server'
authorization:
type: Bearer
credentials: '<your-token>'
static_configs:
- targets: ['server:5001']If secure mode is enabled without a token configured, the endpoint returns 403 Forbidden.
| Mode | How it works | When active |
|---|---|---|
| Pull (Prometheus) | Prometheus scrapes /metrics |
Always (when observability is enabled) |
| Push (OTLP HTTP) | Periodically pushes to an OTel Collector | When OTEL_EXPORTER_OTLP_METRICS_ENDPOINT or OTEL_EXPORTER_OTLP_ENDPOINT is set |
Naming convention: OTel instrument names use dots (e.g.,
blnk.transaction.total). The Prometheus exporter converts these to underscores automatically (e.g.,blnk_transaction_total).
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_transaction_total |
Counter | status, currency |
Total transactions by final status and currency. Use to track throughput and status distribution. |
blnk_transaction_duration_seconds |
Histogram | status |
Wall-clock time of RecordTransaction() in seconds. Use to monitor processing latency and set SLOs. |
blnk_transaction_rejected_total |
Counter | reason |
Rejected transactions by reason. Use to alert on elevated rejection rates. |
status values: APPLIED, REJECTED, INFLIGHT, VOID, COMMIT
reason values: insufficient_funds, overdraft_limit, lock_contention, max_retries, other
currency values: Determined by the transactions processed (e.g., USD, NGN, EUR)
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_queue_enqueued_total |
Counter | queue_name |
Transactions enqueued for async processing. Use to monitor inflow rate per queue. |
blnk_queue_processing_duration_seconds |
Histogram | result |
Time spent processing a transaction in the worker. Use to detect worker slowdowns. |
queue_name values: new:transaction_1 through new:transaction_N (sharded queues), hot_transactions (hot lane)
result values: success
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_balance_created_total |
Counter | — | Total balances created. Use to track account growth. |
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_inflight_commit_total |
Counter | — | Inflight transactions committed. |
blnk_inflight_void_total |
Counter | — | Inflight transactions voided. Use the commit/void ratio to monitor authorization patterns. |
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_transaction_batch_size |
Histogram | — | Number of transactions per coalesced batch. Use to evaluate batching efficiency. |
blnk_transaction_batch_total |
Counter | result |
Coalescing attempts by outcome. |
result values: success, failure, skipped
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_hotpairs_contention_total |
Counter | — | Lock acquisition failures. Spikes indicate contention on specific balance pairs. |
blnk_hotpairs_lane_routed_total |
Counter | lane |
Transactions routed to queue lanes. Use to verify hot lane is activating as expected. |
lane values: normal, hot
| Prometheus Name | Type | Attributes | Description |
|---|---|---|---|
blnk_worker_retries_total |
Counter | reason |
Worker retry events. Sustained retries indicate systemic issues. |
reason values: insufficient_funds, other
# Transaction throughput (per second, 5 minute window)
rate(blnk_transaction_total[5m])
# Rejection rate by reason
rate(blnk_transaction_rejected_total[5m])
# P99 transaction latency
histogram_quantile(0.99, rate(blnk_transaction_duration_seconds_bucket[5m]))
# Queue enqueue rate
rate(blnk_queue_enqueued_total[5m])
# Hot lane traffic ratio
blnk_hotpairs_lane_routed_total{lane="hot"} / blnk_hotpairs_lane_routed_total
# Worker retry rate
rate(blnk_worker_retries_total[5m])
# Batch coalescing success rate
blnk_transaction_batch_total{result="success"} / blnk_transaction_batch_total