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
docs: correct metric names to match actual exported Prometheus names
The OpenTelemetry Prometheus exporter appends `_total` to counter
instruments (see open-telemetry/opentelemetry-go#3360), so the metrics
exposed at /metrics do not match the names listed in this document.
- Align the metric names in the table and sample output with the names
the driver actually registers in pkg/secrets-store/stats_reporter.go.
- Add the `provider` tag to rotation_reconcile_total and
rotation_reconcile_error_total, which the reporter already sets.
- Fix the k8s secret sync histogram name (k8s_secret_duration_sec).
- Note that metrics only appear on driver pods that have served a
mount/unmount/rotation, which can be confusing when port-forwarding.
Fixeskubernetes-sigs#1937
Signed-off-by: Maksym Lushpenko <iviakciivi@gmail.com>
Copy file name to clipboardExpand all lines: docs/book/src/topics/metrics.md
+44-40Lines changed: 44 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,18 @@ Prometheus is the only exporter that's currently supported with the driver.
6
6
7
7
## List of metrics provided by the driver
8
8
9
+
> **Note:** The OpenTelemetry Prometheus exporter appends a `_total` suffix to counter instruments (see [open-telemetry/opentelemetry-go#3360](https://github.com/open-telemetry/opentelemetry-go/pull/3360)). The names below are the names as they appear on the `/metrics` endpoint.
|total_node_publish| Total number of successful volume mount requests |`os_type=<runtime os>`<br>`provider=<provider name>`|
12
-
|total_node_unpublish| Total number of successful volume unmount requests |`os_type=<runtime os>`|
13
-
|total_node_publish_error| Total number of errors with volume mount requests |`os_type=<runtime os>`<br>`provider=<provider name>`<br>`error_type=<error code>`|
14
-
|total_node_unpublish_error| Total number of errors with volume unmount requests |`os_type=<runtime os>`|
15
-
|total_sync_k8s_secret| Total number of k8s secrets synced |`os_type=<runtime os>`<br>`provider=<provider name>`|
16
-
|sync_k8s_secret_duration_sec| Distribution of how long it took to sync k8s secret |`os_type=<runtime os>`|
17
-
|total_rotation_reconcile| Total number of rotation reconciles |`os_type=<runtime os>`<br>`rotated=<true or false>`|
18
-
|total_rotation_reconcile_error| Total number of rotation reconciles with error |`os_type=<runtime os>`<br>`rotated=<true or false>`<br>`error_type=<error code>`|
13
+
|node_publish_total| Total number of successful volume mount requests |`os_type=<runtime os>`<br>`provider=<provider name>`|
14
+
|node_unpublish_total| Total number of successful volume unmount requests |`os_type=<runtime os>`|
15
+
|node_publish_error_total| Total number of errors with volume mount requests |`os_type=<runtime os>`<br>`provider=<provider name>`<br>`error_type=<error code>`|
16
+
|node_unpublish_error_total| Total number of errors with volume unmount requests |`os_type=<runtime os>`|
17
+
|sync_k8s_secret_total| Total number of k8s secrets synced |`os_type=<runtime os>`<br>`provider=<provider name>`|
18
+
|k8s_secret_duration_sec | Distribution of how long it took to sync k8s secret |`os_type=<runtime os>`|
19
+
|rotation_reconcile_total| Total number of rotation reconciles |`os_type=<runtime os>`<br>`provider=<provider name>`<br>`rotated=<true or false>`|
20
+
|rotation_reconcile_error_total| Total number of rotation reconciles with error |`os_type=<runtime os>`<br>`provider=<provider name>`<br>`rotated=<true or false>`<br>`error_type=<error code>`|
19
21
| rotation_reconcile_duration_sec | Distribution of how long it took to rotate secrets-store content for pods |`os_type=<runtime os>`|
20
22
21
23
Metrics are served from port 8095, but this port is not exposed outside the pod by default. Use kubectl port-forward to access the metrics over localhost:
> **Note:** Metrics are only emitted from driver pods that have actually performed the corresponding work (e.g. a volume mount, unmount, or rotation reconcile). When port-forwarding a single pod for validation, it is possible to hit a pod that has not yet served any requests and therefore exposes no driver-specific metrics. Trigger the relevant action against that pod, or query all pods, to see the metrics.
31
+
28
32
### Sample Metrics output
29
33
30
34
```shell
31
-
# HELP sync_k8s_secret_duration_sec Distribution of how long it took to sync k8s secret
0 commit comments