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
Use AllMetrics for enable & disable lists instead of ignoreWhitelist
Use of AllMetrics instead of ignoreWhitelist, adds CpuUsageMetrics
("cpu") & AppMetrics ("app") to metrics that can be disabled/enabled
from command line. Whether they are enabled is already checked by
prometheus export code.
That also makes metricSetValue type redundant, as it can now be
replaced with MetricSet use. Removing it requires moving String() &
Set() methods used by flag package for option handling and validating
given metrics options, to factory.go.
flag.Var(&ignoreMetrics, "disable_metrics", fmt.Sprintf("comma-separated list of `metrics` to be disabled. Options are '%s'.", optstr))
163
-
flag.Var(&enableMetrics, "enable_metrics", fmt.Sprintf("comma-separated list of `metrics` to be enabled. If set, overrides 'disable_metrics'. Options are '%s'.", optstr))
102
+
optstr:=container.AllMetrics.String()
103
+
flag.Var(&ignoreMetrics, "disable_metrics", fmt.Sprintf("comma-separated list of `metrics` to be disabled. Options are %s.", optstr))
104
+
flag.Var(&enableMetrics, "enable_metrics", fmt.Sprintf("comma-separated list of `metrics` to be enabled. If set, overrides 'disable_metrics'. Options are %s.", optstr))
0 commit comments