-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add the histogram bucket bridge #3937
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4032c74
Add the histogram bucket bridge
mfpierre 6472c7d
Add sender test
mfpierre b4481bf
Introduce MetricSampleContext interface
mfpierre ab6b8f2
[wip] flush sketches in check sampler
mfpierre aa82cdf
change integrations-core version
mfpierre b98591a
Fix python init
mfpierre 7a9ceda
Add release note
mfpierre 021afeb
Store bucket deltas
mfpierre df2a290
Handle arbitrarily infinity buckets
mfpierre b5f802c
Add benchmark
mfpierre 42789bd
Optimize using InsertN into the sketch
mfpierre 709cac2
Change infinity logic + add tests
mfpierre 1b5b872
Consider monotonic bucket parameter
mfpierre dedcb45
Address feedback
mfpierre 1e91b99
Address feedback
mfpierre 2bc840b
Revert release.json
mfpierre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handle arbitrarily infinity buckets
- Loading branch information
commit df2a290c0c3cfee756de5ad4c5dc1232f59e713b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is likely going to require some documentation, is there any guideline or standard practice around this in the community?
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.
I wasn't able to find any guideline except what is currently done in the
histogram_quantile
function that requires the infinity bucket but will return the closest bucket if the quantile falls into it:ref https://github.com/prometheus/prometheus/blob/41151ca8dc069448515f48893b8631b9a3ad8df8/promql/quantile.go#L49-L70
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.
Ah. That's confusing and unfortunate, but at least it's deterministic. I'll never understand why they don't just add a max metric. But anyway, for now we should mimc this I guess?
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.
@jbarciauskas I'm not sure how to emulate this behavior with the sketch, don't try to interpolate anything with the infinity bucket? (would mess up the
summary
)Or interpolate everything close/at the value of "the upper bound of the 2nd highest" ? (close to what I'm currently doing)
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.
Yeah, I mean report the count of values in the infinity bucket as the last defined bucket value, essentially as if they were all = max. Either choice (2nd to last bucket = max or 2*2nd to last bucket = max) is synthesizing data that doesn't exist. The first one means that query results should be similar at least.
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.
just changed the logic to insert everything at the
lower_bound
of the infinity bucketThere 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.
Choosing the
lower_bound
makes sense to me, but this needs to be very loudly documented sincemax
is ~always going to be wrong in fairly surprising ways.