Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eeldaly
Copy link

@eeldaly eeldaly commented Dec 12, 2024

What this PR does:
Adds metric name in limiter per-metric exceeded errors

Which issue(s) this PR fixes:
Fixes #6416

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

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
Copy link
Contributor

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?

if actualLimit := l.maxSeriesPerMetric(userID); series < actualLimit {
return nil
}

return errMaxSeriesPerMetricLimitExceeded
return errors.Wrap(errMaxSeriesPerMetricLimitExceeded, "{metric name: " + metric + "}")
Copy link
Contributor

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)?

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ex:

updateFirstPartial(func() error { return wrappedTSDBIngestErr(err, model.Time(timestampMs), lbls) })

Signed-off-by: Essam Eldaly <[email protected]>
@eeldaly eeldaly requested a review from yeya24 December 13, 2024 22:28
Signed-off-by: Essam Eldaly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include metric name in max series per metric limit exceeded error
3 participants