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

Prometheus: Add disableRecordingRules datasource config #70903

Merged
merged 3 commits into from Jun 29, 2023

Conversation

shantanualsi
Copy link
Contributor

@shantanualsi shantanualsi commented Jun 29, 2023

What is this feature?

This PR introduces a config to the Prometheus data source that optionally disables recording rules. It is by default set to false so that existing users of the plugin resort to the default behaviour as before.

Why do we need this feature?

The Prometheus recording rules can be expensive for some instances. This PR adds an optional configuration disableRecordingRules to the Prometheus data source.

Who is this feature for?

Users of prometheus data source plugin

Which issue(s) does this PR fix?:

Fixes #69586

Special notes for your reviewer:
I need some help in making the documentation a bit more specific and useful. I think the snippets that I added to the documentation may be somewhat vague.

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@CLAassistant
Copy link

CLAassistant commented Jun 29, 2023

CLA assistant check
All committers have signed the CLA.

@gtk-grafana gtk-grafana self-requested a review June 29, 2023 13:59
@gtk-grafana gtk-grafana added this to the 10.1.x milestone Jun 29, 2023
Copy link
Collaborator

@lwandz13 lwandz13 left a comment

Choose a reason for hiding this comment

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

lgtm

@gtk-grafana gtk-grafana changed the title Plugins: Add disableRecordingRules config to Prometheus datasource Prometheus: Add disableRecordingRules datasource config Jun 29, 2023
@gtk-grafana
Copy link
Contributor

@lwandz13 Why are we back porting this feature? I think we typically only backport bugs

@lwandz13
Copy link
Collaborator

lwandz13 commented Jun 29, 2023

@lwandz13 Why are we back porting this feature? I think we typically only backport bugs

If this is v10 feature only it needs to be backported to v10 due tot he way the grafana/grafana repo is set up

https://grafana.com/docs/writers-toolkit/writing-guide/tooling-and-workflows/backporting/

@gtk-grafana gtk-grafana added no-backport Skip backport of PR and removed backport v10.0.x labels Jun 29, 2023
@gtk-grafana
Copy link
Contributor

@lwandz13 that flow chart says no-backport D1=>D2=>T1. See https://raintank-corp.slack.com/archives/C02GTT9D6CW/p1688052585513679 for more info

Copy link
Contributor

@gtk-grafana gtk-grafana left a comment

Choose a reason for hiding this comment

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

Code looks good, and things are working for me locally. Thanks for taking a look at this!

@gtk-grafana gtk-grafana enabled auto-merge (squash) June 29, 2023 15:42
@Eve832
Copy link
Collaborator

Eve832 commented Jun 29, 2023

@lwandz13 that flow chart says no-backport D1=>D2=>T1. See https://raintank-corp.slack.com/archives/C02GTT9D6CW/p1688052585513679 for more info

Docs is a little different than code in that we support two previous versions of grafana in addition to latest. So we backport all changes that apply to those versions.
Additionally, if you want your changes applied to latest then you must backport to 10.0x because main tracks next not the current docs

@gtk-grafana
Copy link
Contributor

@Eve832 while this issue has a docs label, it is a new feature, not just docs updates

@gtk-grafana
Copy link
Contributor

Looks like we're hitting an API limit in drone, it resets every hour, I'll rerun the jobs in a bit and get this merged

@gtk-grafana gtk-grafana merged commit 72581a7 into grafana:main Jun 29, 2023
12 of 14 checks passed
harisrozajac pushed a commit that referenced this pull request Jun 29, 2023
* Add config to toggle recording rules for Prometheus

* Add documentation for Prometheus disableRecordingRules
harisrozajac pushed a commit that referenced this pull request Jun 30, 2023
* Add config to toggle recording rules for Prometheus

* Add documentation for Prometheus disableRecordingRules
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
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.

Prometheus: Disable recording and alerting rules api endpoint
7 participants