-
Notifications
You must be signed in to change notification settings - Fork 804
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
Implement max bucket limit and automatic resolution reduction #6104
Conversation
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
pkg/util/validation/limits.go
Outdated
@@ -722,6 +725,11 @@ func (o *Overrides) EnforceMetadataMetricName(userID string) bool { | |||
return o.GetOverridesForUser(userID).EnforceMetadataMetricName | |||
} | |||
|
|||
// MaxNativeHistogramBuckets. |
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.
nit: Can we add comment on what this function is 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.
Addressed in latest commit.
pkg/util/validation/validate.go
Outdated
@@ -52,6 +52,9 @@ const ( | |||
exemplarLabelsTooLong = "exemplar_labels_too_long" | |||
exemplarTimestampInvalid = "exemplar_timestamp_invalid" | |||
|
|||
// Native Histogram specific validation reasons | |||
nativeHistogramBucketsExceeded = "native_histogram_buckets_exceeded" |
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 make the error more specific like nativeHistogramBucketCountLimitExceeded
?
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.
Addressed in latest commit.
Signed-off-by: Ben Ye <benye@amazon.com>
What this PR does:
Introduce a new limit
max_native_histogram_buckets
which limits maximum number of buckets of a native histogram sample. When exceeding the limit, Distributor will try to reduce the ingested histogram resolution until it is within the buckeet limit or the resolution can't be reduced anymore.Which issue(s) this PR fixes:
Fixes #6092
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]