-
Bug
-
Resolution: Unresolved
-
Minor
-
None
The Metrics plugin has code for collecting the history of metrics to an ExponentialLeakyBucket<T> and serving it over HTTP at /metrics/metricsHistory, but it does not work because the MetricsRootAction.Sampler.isEnabled() method returns the wrong boolean, ever since JENKINS-32696 pull request jenkinsci/metrics-plugin#20.
MetricsRootAction.Sampler.SIZE has 128 as its default value, and the javadoc says negative sizes should disable the sampler.
MetricsRootAction.Sampler.isEnabled() is implemented incorrectly, returning false when SIZE is positive.
MetricsRootAction.doMetricsHistory then returns a 404 Not Found response because Sampler.isEnabled() returned false.
- is related to
-
JENKINS-32696 healthcheck API endpoint causes a new run of health checks instead of reusing previous values
-
- Resolved
-