Skip to content

Commit 6cc9046

Browse files
LucasRoesleralexellis
authored andcommitted
Add metrics example filtering on a single function
Signed-off-by: Lucas Roesler <[email protected]>
1 parent 9963b6d commit 6cc9046

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/reference/metrics.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,13 @@ Return the average function execution time, as measure over the previous 20 seco
4444
(rate(gateway_functions_seconds_sum[20s]) / rate(gateway_functions_seconds_count[20s]))
4545
```
4646

47+
### Metrics for a single function
48+
49+
Each of the metrics generated by the Gateway are labeled with and can be filtered by the function name, For example The invocation rate for just a single function (e.g. if the function name is `echo`) is given by
50+
51+
```
52+
rate ( gateway_function_invocation_total{function_name='echo'} [20s])
53+
```
54+
4755
[prom-query-basics]: https://prometheus.io/docs/prometheus/latest/querying/basics/
4856
[prom-query-examples]: https://prometheus.io/docs/prometheus/latest/querying/examples/

0 commit comments

Comments
 (0)