mirror of https://github.com/dapr/docs.git
Add metrics filter rules and video (#3174)
* add to metrics overview, bring in demo Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> * update from yaron Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> * add table Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> --------- Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
parent
87c49b1b25
commit
a97d4669d9
|
|
@ -103,7 +103,21 @@ The following table lists the properties for metrics:
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
|--------------|--------|-------------|
|
|--------------|--------|-------------|
|
||||||
| `enabled` | boolean | Whether metrics should to be enabled.
|
| `enabled` | boolean | Whether metrics should to be enabled. |
|
||||||
|
| `rules` | boolean | Named rule to filter metrics. Each rule contains a set of `labels` to filter on and a`regex`expression to apply to the metrics path. |
|
||||||
|
|
||||||
|
To mitigate high memory usage and egress costs associated with [high cardinality metrics]({{< ref "metrics-overview.md#high-cardinality-metrics" >}}), you can set regular expressions for every metric exposed by the Dapr sidecar. For example:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
metric:
|
||||||
|
enabled: true
|
||||||
|
rules:
|
||||||
|
- name: dapr_runtime_service_invocation_req_sent_total
|
||||||
|
labels:
|
||||||
|
- name: method
|
||||||
|
regex:
|
||||||
|
"orders/": "orders/.+"
|
||||||
|
```
|
||||||
|
|
||||||
See [metrics documentation]({{< ref "metrics-overview.md" >}}) for more information.
|
See [metrics documentation]({{< ref "metrics-overview.md" >}}) for more information.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,13 @@ spec:
|
||||||
|
|
||||||
When this configuration is applied, a recorded metric with the `method` label of `orders/a746dhsk293972nz` will be replaced with `orders/`.
|
When this configuration is applied, a recorded metric with the `method` label of `orders/a746dhsk293972nz` will be replaced with `orders/`.
|
||||||
|
|
||||||
|
### Watch the demo
|
||||||
|
|
||||||
|
Watch [this video to walk through handling high cardinality metrics](https://youtu.be/pOT8teL6j_k?t=1524):
|
||||||
|
|
||||||
|
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/pOT8teL6j_k?start=1524" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
||||||
|
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [Howto: Run Prometheus locally]({{< ref prometheus.md >}})
|
* [Howto: Run Prometheus locally]({{< ref prometheus.md >}})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue