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

Changing the per labelset config to be more generic #5993

Merged
merged 6 commits into from
Jun 4, 2024

Conversation

alanprot
Copy link
Member

@alanprot alanprot commented May 31, 2024

What this PR does:
MaxSeriesPerLabelset was introduced on #5950 but the configuration format would not allow us in the future to configure more limits as "samples ingested per labelset"

This PR is just changing the configuration to be a bit more generic where we can extend to other limits in the future:

Config Before:

max_series_per_label_set:
  - label_set:
      labelName1: LabelValue1
    limit: 10
  - label_set:
      labelName1: LabelValue1
      labelName2: LabelValue2
    limit: 3

Config Now:

limits_per_label_set:
  - label_set:
      labelName1: LabelValue1
    limits:
      max_series: 10
  - label_set:
      labelName1: LabelValue1
      labelName2: LabelValue2
    limits:
      max_series: 3

We also changed the usage metric from cortex_ingester_active_series_per_labelset to cortex_ingester_usage_per_labelset and created a new metric with the configured limit: cortex_ingester_limits_per_labelset as follow:

cortex_ingester_limits_per_labelset{labelset="{label1=\"value1\"}",limit="max_series",user="1"} 10
cortex_ingester_usage_per_labelset{labelset="{label1=\"value1\"}",limit="max_series",user="1"} 2

Which issue(s) this PR fixes:
Fixes #

Checklist

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

Signed-off-by: alanprot <alanprot@gmail.com>
alanprot added 4 commits June 3, 2024 11:16
Signed-off-by: alanprot <alanprot@gmail.com>
Signed-off-by: alanprot <alanprot@gmail.com>
Signed-off-by: alanprot <alanprot@gmail.com>
Signed-off-by: alanprot <alanprot@gmail.com>
@alanprot alanprot requested a review from yeya24 June 3, 2024 22:38
@yeya24 yeya24 changed the title Changing the per labelset config to be more generic: Changing the per labelset config to be more generic Jun 4, 2024
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks!

pkg/ingester/user_state.go Outdated Show resolved Hide resolved
Signed-off-by: alanprot <alanprot@gmail.com>
@yeya24 yeya24 enabled auto-merge (squash) June 4, 2024 20:11
@alanprot alanprot disabled auto-merge June 4, 2024 20:22
@yeya24 yeya24 merged commit 35732c3 into cortexproject:master Jun 4, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants