-
Notifications
You must be signed in to change notification settings - Fork 1
feat: metrics curation #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #63 +/- ##
============================================
- Coverage 69.50% 69.23% -0.28%
- Complexity 105 106 +1
============================================
Files 15 15
Lines 564 559 -5
Branches 33 32 -1
============================================
- Hits 392 387 -5
Misses 153 153
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| * | ||
| * See https://micrometer.io/docs/concepts#_timers for more details on the Timer. | ||
| */ | ||
| public static Timer registerTimer(String name, Map<String, String> tags, boolean histogram, Duration minExpectedValue, Duration maxExpectedValue) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this minExpectedValue and maxExpectedValue and how will that help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For histograms, if these min/max are not configured, then the algorithm will create huge number of buckets (~70 for timers, ~270 for distribution summaries). Each of these buckets translates to 1 time series in prometheus and that causes the prometheus to overflow/OOM/slowdown when we have many such meters.
Hence, micrometer recommends to set these limits.
minimumExpectedValue/maximumExpectedValue: Controls the number of buckets shipped by publishPercentileHistogram and controls the accuracy and memory footprint of the underlying HdrHistogram structure.
https://micrometer.io/docs/concepts#_histograms_and_percentiles
Description
More details about histograms here.
https://micrometer.io/docs/concepts#_histograms_and_percentiles
Testing
Tested manually.
Checklist:
Documentation
NA.