-
Notifications
You must be signed in to change notification settings - Fork 806
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 metric name in limiter per-metric exceeded errors #6422
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Essam Eldaly <[email protected]>
Signed-off-by: Essam Eldaly <[email protected]>
Signed-off-by: Essam Eldaly <[email protected]>
CHANGELOG.md
Outdated
@@ -46,11 +46,12 @@ | |||
* [ENHANCEMENT] Add new option `-server.grpc_server-num-stream-workers` to configure the number of worker goroutines that should be used to process incoming streams. #6386 | |||
* [ENHANCEMENT] Distributor: Return HTTP 5XX instead of HTTP 4XX when instance limits are hit. #6358 | |||
* [ENHANCEMENT] Ingester: Make sure unregistered ingester joining the ring after WAL replay. #6277 | |||
* [ENHANCEMENT] Distributor: Add a new `-distributor.num-push-workers` flag to use a goroutine worker pool when sending data from distributor to ingesters. #6406 | |||
* [ENHANCEMENT] Added metric name in limiter per-metric exceeded errors |
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 include the PR number here?
pkg/ingester/limiter.go
Outdated
if actualLimit := l.maxSeriesPerMetric(userID); series < actualLimit { | ||
return nil | ||
} | ||
|
||
return errMaxSeriesPerMetricLimitExceeded | ||
return errors.Wrap(errMaxSeriesPerMetricLimitExceeded, "{metric name: " + metric + "}") |
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 change errMaxSeriesPerMetricLimitExceeded
to take metric name as a parameter and we use errors.Wrapf(errMaxSeriesPerMetricLimitExceeded, metric)
?
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.
We already have the labels on the handleAppendFailure
, no? we can just send those labels down to format the error?
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.
Ex:
cortex/pkg/ingester/ingester.go
Line 1161 in 6be0378
updateFirstPartial(func() error { return wrappedTSDBIngestErr(err, model.Time(timestampMs), lbls) }) |
Signed-off-by: Essam Eldaly <[email protected]>
Signed-off-by: Essam Eldaly <[email protected]>
Signed-off-by: Essam Eldaly <[email protected]>
What this PR does:
Adds metric name in limiter per-metric exceeded errors
Which issue(s) this PR fixes:
Fixes #6416
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]