Skip to content

Commit 531b3cc

Browse files
authored
Merge pull request #52751 from richabanker/hidden-metrics
Align docs for metric lifecycle
2 parents 2d37554 + 8b04931 commit 531b3cc

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

content/en/docs/concepts/cluster-administration/system-metrics.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ rules:
5757
5858
## Metric lifecycle
5959
60-
Alpha metric → Stable metric → Deprecated metric → Hidden metric → Deleted metric
60+
Alpha metric → Beta metric → Stable metric → Deprecated metric → Hidden metric → Deleted metric
6161
6262
Alpha metrics have no stability guarantees. These metrics can be modified or deleted at any time.
6363
64+
Beta metrics observe a looser API contract than its stable counterparts. No labels can be removed from beta metrics during their lifetime, however, labels can be added while the metric is in the beta stage.
65+
6466
Stable metrics are guaranteed to not change. This means:
6567
6668
* A stable metric without a deprecated signature will not be deleted or renamed
@@ -87,8 +89,13 @@ For example:
8789
some_counter 0
8890
```
8991

90-
Hidden metrics are no longer published for scraping, but are still available for use. To use a
91-
hidden metric, please refer to the [Show hidden metrics](#show-hidden-metrics) section.
92+
Hidden metrics are no longer published for scraping, but are still available for use.
93+
A deprecated metric becomes a hidden metric after a period of time, based on its stability level:
94+
* **STABLE** metrics become hidden after a minimum of 3 releases or 9 months, whichever is longer.
95+
* **BETA** metrics become hidden after a minimum of 1 release or 4 months, whichever is longer.
96+
* **ALPHA** metrics can be hidden or removed in the same release in which they are deprecated.
97+
98+
To use a hidden metric, you must enable it. For more details, refer to the [Show hidden metrics](#show-hidden-metrics) section.
9299

93100
Deleted metrics are no longer published and cannot be used.
94101

@@ -103,21 +110,12 @@ deprecated in that release. The version is expressed as x.y, where x is the majo
103110
the minor version. The patch version is not needed even though a metrics can be deprecated in a
104111
patch release, the reason for that is the metrics deprecation policy runs against the minor release.
105112

106-
The flag can only take the previous minor version as it's value. All metrics hidden in previous
107-
will be emitted if admins set the previous version to `show-hidden-metrics-for-version`. The too
108-
old version is not allowed because this violates the metrics deprecated policy.
109-
110-
Take metric `A` as an example, here assumed that `A` is deprecated in 1.n. According to metrics
111-
deprecated policy, we can reach the following conclusion:
112-
113-
* In release `1.n`, the metric is deprecated, and it can be emitted by default.
114-
* In release `1.n+1`, the metric is hidden by default and it can be emitted by command line
115-
`show-hidden-metrics-for-version=1.n`.
116-
* In release `1.n+2`, the metric should be removed from the codebase. No escape hatch anymore.
113+
The flag can only take the previous minor version as its value. If you want to show all metrics hidden in the previous release, you can set the `show-hidden-metrics-for-version` flag to the previous version. Using a version that is too old is not allowed because it violates the metrics deprecation policy.
117114

118-
If you're upgrading from release `1.12` to `1.13`, but still depend on a metric `A` deprecated in
119-
`1.12`, you should set hidden metrics via command line: `--show-hidden-metrics=1.12` and remember
120-
to remove this metric dependency before upgrading to `1.14`
115+
For example, let's assume metric `A` is deprecated in `1.29`. The version in which metric `A` becomes hidden depends on its stability level:
116+
* If metric `A` is **ALPHA**, it could be hidden in `1.29`.
117+
* If metric `A` is **BETA**, it will be hidden in `1.30` at the earliest. If you are upgrading to `1.30` and still need `A`, you must use the command-line flag `--show-hidden-metrics-for-version=1.29`.
118+
* If metric `A` is **STABLE**, it will be hidden in `1.32` at the earliest. If you are upgrading to `1.32` and still need `A`, you must use the command-line flag `--show-hidden-metrics-for-version=1.31`.
121119

122120
## Component metrics
123121

0 commit comments

Comments
 (0)