Skip to content

docs(proxy-metrics): fix identity certificate metric names - #2164

Open
NopeCharon wants to merge 1 commit into
linkerd:mainfrom
NopeCharon:docs-identity-cert-metric-names
Open

NopeCharon wants to merge 1 commit into
linkerd:mainfrom
NopeCharon:docs-identity-cert-metric-names

Conversation

@NopeCharon

Copy link
Copy Markdown

The Identity Metrics section of the proxy metrics reference lists identity_cert_expiration_timestamp_seconds and identity_cert_refresh_count. Neither name matches what current proxies export:

This PR documents the names each version actually exports:

Version Metrics
2.15 identity_cert_expiration_timestamp_seconds, identity_cert_refresh_timestamp_seconds, identity_cert_refreshes_total
2.16 - 2.19, edge, docs control_identity_cert_expiration_timestamp_seconds, control_identity_cert_refresh_timestamp_seconds, control_identity_cert_refreshes_total

It also documents the result label (ok/error) on the refreshes counter. I left 2.14 and earlier unchanged because their proxy (v2.210.x) still exports identity_cert_refresh_count.

The names come from the proxy source at the release tags each version ships (.proxy-version in linkerd2): linkerd/identity/src/metrics.rs, plus the registry prefixes in linkerd/app/src/{lib,identity}.rs.

Testing: make lint passes, and a local hugo build renders the updated lists on the 2.15, 2.19 and edge pages.

Fixes #1776

Problem

The Identity Metrics section of the proxy metrics reference still lists
`identity_cert_expiration_timestamp_seconds` and
`identity_cert_refresh_count`, which no longer match what the proxy
exports:

- linkerd2-proxy#2617 (proxy v2.221.0, Linkerd 2.15) renamed
  `identity_cert_refresh_count` to `identity_cert_refreshes_total`, gave
  it a `result` label, and added
  `identity_cert_refresh_timestamp_seconds`.
- linkerd2-proxy#2887 (edge-24.5.1, Linkerd 2.16) registered these
  metrics under the `control_identity` prefix, so they are now exported
  as `control_identity_cert_*`.

Users building dashboards or alerts from the docs end up querying
metrics that do not exist.

Solution

Document the metric names that each version actually exports:

- 2.15: `identity_cert_expiration_timestamp_seconds`,
  `identity_cert_refresh_timestamp_seconds` and
  `identity_cert_refreshes_total`.
- 2.16 through 2.19, edge and docs: the same metrics with the
  `control_identity_cert_` prefix.

Also describe the `result` label (`ok`/`error`) of the refreshes
counter. Docs for 2.14 and earlier are unchanged, since those proxies
still export `identity_cert_refresh_count`.

Fixes linkerd#1776

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proxy metric names for identity cert management are inaccurate for edge-24.5.1

1 participant