You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**What**
- Add reference documentation for the metrics exposed by the gateway
- Include examples for the usage of those metrics
Signed-off-by: Lucas Roesler <[email protected]>
|`gateway_functions_seconds`| histogram | Function invocation time taken |`function_name`|
8
+
|`gateway_function_invocation_total`| counter | Function invocation count |`function_name`, `code`|
9
+
|`gateway_service_count`| counter | Number of function replicas |`function_name`|
10
+
11
+
## Examples
12
+
13
+
These basic metrics can be used to track the health of your functions as well a general usage patterns. See the Prometheus [documentation][prom-query-basics] and [examples][prom-query-examples] for more details about the available options and query functions. Below are several queries you might want to include in a basic [Grafana](https://grafana.com) dashboard for observing your OpenFaaS functions
14
+
15
+
### Function invocation rate
16
+
17
+
Return the per-second rate of invocation as measured over the previous 20 seconds:
18
+
19
+
```
20
+
rate ( gateway_function_invocation_total [20s])
21
+
```
22
+
23
+
### Function replica count / scaling
24
+
25
+
Return the total function replicas:
26
+
27
+
```
28
+
gateway_service_count
29
+
```
30
+
31
+
### Total OK Function Invocation
32
+
33
+
Return the total number of successful function invocations:
0 commit comments