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: Fix calculating rate interval when there is no interval specified #78193

Merged

Conversation

itsmylife
Copy link
Contributor

@itsmylife itsmylife commented Nov 15, 2023

What is this feature?

When there is no specific interval is picked we send the interval value as an empty string. Data source scrape interval will be used under the hood to calculate the rate interval. We recently updated $__rate_interval calculation (see it here: #77234) for an edge case and this case was missed accidentally. This PR is fixing the issue.

Why do we need this feature?

Proper $__rate_interval calculation

Who is this feature for?

All Prometheus users

Special notes for your reviewer:

How to test it?

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.

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.

Fix is working locally. FYI for others testing: to repro this you need a scrape interval that is something other then default (15s)

@itsmylife itsmylife changed the title Prometheus Use data source scrape interval when no interval is specified Prometheus: Fix calculating rate interval when there is no interval specified Nov 15, 2023
@itsmylife itsmylife merged commit 0214b25 into main Nov 15, 2023
15 checks passed
@itsmylife itsmylife deleted the ismail/fix-rate-interval-calc-when-interval-empty-string branch November 15, 2023 15:20
@aangelisc aangelisc modified the milestones: 10.3.x, 10.2.3 Dec 21, 2023
@tolzhabayev tolzhabayev added backport v10.2.x and removed no-backport Skip backport of PR labels Mar 7, 2024
grafana-delivery-bot bot pushed a commit that referenced this pull request Mar 7, 2024
…pecified (#78193)

* Use data source scrape interval when no interval is specified

* scrape interval as 15s

(cherry picked from commit 0214b25)
tolzhabayev pushed a commit that referenced this pull request Mar 11, 2024
…interval specified (#84082)

Prometheus: Fix calculating rate interval when there is no interval specified (#78193)

* Use data source scrape interval when no interval is specified

* scrape interval as 15s

(cherry picked from commit 0214b25)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
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.

None yet

4 participants