fix metric names

This commit is contained in:
Han Kang 2023-07-12 11:23:07 -07:00
parent d32aa62d84
commit aa788219f4
3 changed files with 30 additions and 6 deletions

View File

@ -23,7 +23,7 @@ import (
var ( var (
RegisteredMetrics = k8smetrics.NewCounterVec( RegisteredMetrics = k8smetrics.NewCounterVec(
&k8smetrics.CounterOpts{ &k8smetrics.CounterOpts{
Name: "registered_metric_total", Name: "registered_metrics_total",
Help: "The count of registered metrics broken by stability level and deprecation version.", Help: "The count of registered metrics broken by stability level and deprecation version.",
StabilityLevel: k8smetrics.BETA, StabilityLevel: k8smetrics.BETA,
}, },
@ -32,7 +32,7 @@ var (
DisabledMetricsTotal = k8smetrics.NewCounter( DisabledMetricsTotal = k8smetrics.NewCounter(
&k8smetrics.CounterOpts{ &k8smetrics.CounterOpts{
Name: "disabled_metric_total", Name: "disabled_metrics_total",
Help: "The count of disabled metrics.", Help: "The count of disabled metrics.",
StabilityLevel: k8smetrics.BETA, StabilityLevel: k8smetrics.BETA,
}, },
@ -40,7 +40,7 @@ var (
HiddenMetricsTotal = k8smetrics.NewCounter( HiddenMetricsTotal = k8smetrics.NewCounter(
&k8smetrics.CounterOpts{ &k8smetrics.CounterOpts{
Name: "hidden_metric_total", Name: "hidden_metrics_total",
Help: "The count of hidden metrics.", Help: "The count of hidden metrics.",
StabilityLevel: k8smetrics.BETA, StabilityLevel: k8smetrics.BETA,
}, },

View File

@ -39,7 +39,7 @@ var (
registeredMetrics = NewCounterVec( registeredMetrics = NewCounterVec(
&CounterOpts{ &CounterOpts{
Name: "registered_metric_total", Name: "registered_metrics_total",
Help: "The count of registered metrics broken by stability level and deprecation version.", Help: "The count of registered metrics broken by stability level and deprecation version.",
StabilityLevel: BETA, StabilityLevel: BETA,
}, },
@ -48,7 +48,7 @@ var (
disabledMetricsTotal = NewCounter( disabledMetricsTotal = NewCounter(
&CounterOpts{ &CounterOpts{
Name: "disabled_metric_total", Name: "disabled_metrics_total",
Help: "The count of disabled metrics.", Help: "The count of disabled metrics.",
StabilityLevel: BETA, StabilityLevel: BETA,
}, },
@ -56,7 +56,7 @@ var (
hiddenMetricsTotal = NewCounter( hiddenMetricsTotal = NewCounter(
&CounterOpts{ &CounterOpts{
Name: "hidden_metric_total", Name: "hidden_metrics_total",
Help: "The count of hidden metrics.", Help: "The count of hidden metrics.",
StabilityLevel: BETA, StabilityLevel: BETA,
}, },

View File

@ -491,6 +491,22 @@
- 10 - 10
- 15 - 15
- 30 - 30
- name: disabled_metrics_total
help: The count of disabled metrics.
type: Counter
stabilityLevel: BETA
- name: hidden_metrics_total
help: The count of hidden metrics.
type: Counter
stabilityLevel: BETA
- name: feature_enabled
namespace: kubernetes
help: This metric records the data about the stage and enablement of a k8s feature.
type: Gauge
stabilityLevel: BETA
labels:
- name
- stage
- name: healthcheck - name: healthcheck
namespace: kubernetes namespace: kubernetes
help: This metric records the result of a single healthcheck. help: This metric records the result of a single healthcheck.
@ -508,3 +524,11 @@
- name - name
- status - status
- type - type
- name: registered_metrics_total
help: The count of registered metrics broken by stability level and deprecation
version.
type: Counter
stabilityLevel: BETA
labels:
- deprecated_version
- stability_level