-
Notifications
You must be signed in to change notification settings - Fork 512
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
Reduce histogram resolution instead of rejecting #6535
Conversation
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Use "reduce" instead of "downscale" everywhere. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
pkg/mimirpb/custom.go
Outdated
} | ||
|
||
func (h *Histogram) reduceFloatResolution() (int, error) { | ||
if h.Schema == -4 { |
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.
Can we have a meaningful constant for this somewhere?
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.
Added definition in the same file. I looked again, but it's never exported from Prometheus, so I have to make a PR in Prometheus first to solve it...
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'm not an expert in all the code that comes from Prometheus, but that already had its review. The new code putting it here looks good to me. Consider my comment about adding a constant for that -4
, it seems really strange to someone who never saw anything about native histograms.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
What this PR does
Introduce new configuration parameter to be able to disable the new function.
Reduce native histogram resolution instead of rejecting it if it is above bucket limit.
Which issue(s) this PR fixes or relates to
Fixes #5367
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]