-
Notifications
You must be signed in to change notification settings - Fork 803
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
Proposal: Create a new "Per LabelSet" limit #5950
Conversation
Signed-off-by: alanprot <alanprot@gmail.com>
96dbf32
to
e64c0e1
Compare
I still need to update the changelog but I think we can start reviewing 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.
Thanks
perMetricSeriesLimitCount++ | ||
updateFirstPartial(func() error { | ||
return makeMetricLimitError(perMetricSeriesLimit, copiedLabels, i.limiter.FormatError(userID, cause)) | ||
}) | ||
continue | ||
case errors.As(cause, &errMaxSeriesPerLabelSetLimitExceeded{}): | ||
updateFirstPartial(func() 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.
Dont we want to create a new discarded samples reason label here?
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.
indeed.
I will create another PR with this and the chngelog in a bit.
Should https://cortexmetrics.io/docs/configuration/configuration-file/ be updated? |
What this PR does:
This pull request (PR) introduces a new limit Active Series "Per LabelSet." This limit functions similarly to -ingester.max-series-per-metric, but allowing users to define the maximum number of series per LabelSet.
These limits are configurable via runtime settings and with the following format:
The limits are applied "Per labelset", meaning that only metrics containing all the labels of the limit will be subjected to it.
Additionally, a new metric is implemented to monitor the active timeseries for each limit as follows:
The motivation behind these limits is to enable service administrators to set constraints on a per labelset basis. This functionality helps mitigate the risk of unexpected increases in the number of timeseries.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]