Merge pull request #2349 from hhunter-ms/typo_codesnippet

[metrics] fix code snippet typo
This commit is contained in:
greenie-msft 2022-04-20 14:51:19 -07:00 committed by GitHub
commit ed41ed4666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 6 deletions

View File

@ -6,13 +6,18 @@ weight: 4000
description: "Observing Dapr metrics in Kubernetes"
---
Dapr exposes a [Prometheus](https://prometheus.io/) metrics endpoint that you can scrape to gain a greater understanding of how Dapr is behaving and to setup alerts for specific conditions.
Dapr exposes a [Prometheus](https://prometheus.io/) metrics endpoint that you can scrape to:
- Gain a greater understanding of how Dapr is behaving.
- Set up alerts for specific conditions.
## Configuration
The metrics endpoint is enabled by default, you can disable it by passing the command line argument `--enable-metrics=false` to Dapr system processes.
The metrics endpoint is enabled by default. You can disable it by passing the command line argument `--enable-metrics=false` to Dapr system processes.
The default metrics port is `9090`. This can be overridden by passing the command line argument `--metrics-port` to Daprd. Additionally, the metrics exporter can be disabled for a specific application by setting the `dapr.io/enable-metrics: "false"` annotation to your application deployment. With the metrics exporter disabled, `daprd` will not open the metrics listening port.
The default metrics port is `9090`. You can override this by passing the command line argument `--metrics-port` to Daprd.
You can also disable the metrics exporter for a specific application by setting the `dapr.io/enable-metrics: "false"` annotation to your application deployment. With the metrics exporter disabled, `daprd` will not open the metrics listening port.
```yaml
apiVersion: apps/v1
@ -45,7 +50,10 @@ spec:
imagePullPolicy: Always
```
To disable the metrics collection in the Dapr side cars running in a specific namespace, you can use the `metric` spec configuration and set `enabled: false` to disable the metrics in the Dapr runtime.
To disable the metrics collection in the Dapr side cars running in a specific namespace:
- Use the `metrics` spec configuration.
- Set `enabled: false` to disable the metrics in the Dapr runtime.
```yaml
apiVersion: dapr.io/v1alpha1
@ -56,13 +64,13 @@ metadata:
spec:
tracing:
samplingRate: "1"
metric:
metrics:
enabled: true
```
## Metrics
Each Dapr system process emits Go runtime/process metrics by default and have their own metrics:
By default, each Dapr system process emits Go runtime/process metrics and have their own metrics:
- [Dapr metric list](https://github.com/dapr/dapr/blob/master/docs/development/dapr-metrics.md)