Skip to content

feat: Emit per-tenant limit overrides as metrics #3785

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

Merged
merged 4 commits into from
Feb 9, 2021
Merged

feat: Emit per-tenant limit overrides as metrics #3785

merged 4 commits into from
Feb 9, 2021

Conversation

56quarters
Copy link
Contributor

What this PR does:

Add a new target (not enabled as part of "all") that can be used to
expose per-tenant limit overrides as Prometheus metrics. These metrics
are updated as runtime configuration is periodically reloaded.

Exposing these metrics enables use cases like proactively alerting when
tenants start to approach their limits, instead of letting them hit their
limits and start to lose data.

Which issue(s) this PR fixes:

Fixes #1433

See also #2957

Checklist

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

Signed-off-by: Nick Pillitteri nick.pillitteri@grafana.com

Copy link
Contributor

@jtlisi jtlisi left a comment

Choose a reason for hiding this comment

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

LGTM

Add a new target (not enabled as part of "all") that can be used to
expose per-tenant limit overrides as Prometheus metrics. These metrics
are updated as runtime configuration is periodically reloaded.

Exposing these metrics enables use cases like proactively alerting when
tenants start to approach their limits, instead of letting them hit their
limits and start to lose data.

Fixes #1433

See also #2957

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Nice work. I'd suggest to simplify the design of OverridesExporter, since it doesn't need to react on changing values immediately.

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
@56quarters 56quarters requested a review from pstibrany February 8, 2021 15:52
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

You did great! 👏

@pracucci pracucci merged commit c77a331 into cortexproject:master Feb 9, 2021
@56quarters 56quarters deleted the override-exporter branch March 7, 2021 23:24
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.

Add metrics to properly monitor validation limits
4 participants