-
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 default partition when no matching labelset liimits #6435
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yeya24
force-pushed
the
default-partition
branch
from
December 17, 2024 17:12
061d491
to
986c1c2
Compare
…abels Signed-off-by: Ben Ye <[email protected]>
yeya24
force-pushed
the
default-partition
branch
from
December 17, 2024 17:24
986c1c2
to
f73e148
Compare
alanprot
reviewed
Dec 17, 2024
Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
alanprot
reviewed
Dec 17, 2024
alanprot
reviewed
Dec 17, 2024
totalCount++ | ||
func getCardinalityForLimitsPerLabelSet(ctx context.Context, numSeries uint64, ir tsdb.IndexReader, allLimits []validation.LimitsPerLabelSet, limit validation.LimitsPerLabelSet) (int, error) { | ||
// Easy path with explicit labels. | ||
if limit.LabelSet.Len() > 0 { |
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.
Should we document in the label set config that a empty labelset is the "default" and will match all other series?
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.
Updated in the latest commit
Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
alanprot
approved these changes
Dec 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does:
We added per labelset limits in Per LabelSet, which allows users to define
subtenants
within a user by defining labelsets and we can apply limits such as active series to throttle the usage of each subtenant.There is a scenario where
team
label is used to define subtenants for a user. However, there might be a lot of teams and it is not easy to set limits for every team explicitly. Instead, users can define labelsets limits for some of the large teams and use put rest of teams using a catch all limit. This is called the default partition, which means it matches series that doesn't match any of the existing labelset limits.Default partition doesn't have any label defined. In the example below, the second limit is the default partition and it should match all series that with name != prometheus_build_info.
Metrics for default partition looks like below.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]