Skip to content

Commit 9088cc8

Browse files
weltekialexellis
authored andcommitted
Document NATS reconnect counter metrics
Add documentation for the new Prometheus counter metrics that track NATS client reconnections across the gateway, operator and JetStream queue-worker components. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
1 parent 2b1576a commit 9088cc8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

docs/architecture/metrics.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Advanced metrics for OpenFaaS Pro users:
5050
| `http_request_duration_seconds` | histogram | Seconds spent serving HTTP requests | `method`, `path`, `status` | Pro Edition |
5151
| `http_requests_total` | counter | The total number of HTTP requests | `method`, `path`, `status` | Pro Edition |
5252
| `http_requests_total` | counter | The total number of HTTP requests | `method`, `path`, `status` | Pro Edition |
53+
| `gateway_nats_reconnect_total` | counter | Total number of times the NATS client has reconnected | | Pro Edition |
5354

5455
The `http_request*` metrics record the latency and statistics of `/system/*` routes to monitor the OpenFaaS gateway and its provider. The `/async-function` route is also recorded in these metrics to observe asynchronous ingestion rate and latency.
5556

@@ -60,6 +61,7 @@ Additional metrics from the Operator:
6061
| `faasnetes_scale_total` | counter | Number of times a function has been scaled (ignoring requests where current and desired replicas are equal) | `function_name`, `status` | Pro Edition |
6162
| `faasnetes_sync_handler_gauge` | gauge | Number of reconciliation functions running at given time | `status` | Pro Edition |
6263
| `faasnetes_sync_handler_histogram` | histogram | Time taken to reconcile function Custom Resources into Kubernetes objects | `status` | Pro Edition |
64+
| `faasnetes_nats_reconnect_total` | counter | Total number of times the NATS client has reconnected | | Pro Edition |
6365

6466
The `faasnetes_scale_total` metric is useful for tracking the number of times a function has been scaled up or down. The `faasnetes_sync_handler_gauge` and `faasnetes_sync_handler_histogram` metrics are useful for tracking the amount of time spent reconciling function Custom Resources into Kubernetes objects in large deployments of OpenFaaS.
6567

@@ -82,6 +84,7 @@ The queue-worker for NATS JetStream exposes metrics to help you get insight in t
8284
| `queue_worker_messages_processed_total` | counter | Total number of messages processed | `queue_name`, `kubernetes_pod_name` | Pro Edition |
8385
| `queue_worker_messages_submitted_total` | gauge | Total number of messages submitted to the queue by the gateway | `queue_name`, `kubernetes_pod_name` | Pro Edition |
8486
| `queue_worker_function_invocation_inflight` | gauge | Total number of inflight function requests made by the queue-worker | `queue_name`, `function_name` | Pro Edition |
87+
| `queue_worker_nats_reconnect_total` | counter | Total number of times the NATS client has reconnected | | Pro Edition |
8588

8689
## Watchdog
8790

0 commit comments

Comments
 (0)