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

Use variable rate interval for blob thoughput metrics based on time interval #621

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

pschork
Copy link
Contributor

@pschork pschork commented Jun 26, 2024

DA internal dashboard blob throughput does not match blob explorer throughput graphs because dataapi query uses 2m rate interval and DA dashboard uses auto $__rate_interval

Blob explorer show 5MiB spikes, whereas DA dashboard show 1.5MiB throughput.
image
image
Comparison overlay of 5MiB 2m rate vs 1.5MiB 4m rate aka $__rate_interval
image

Blob explorer throughput breaks when you expand to 24h & 7d because of the 2m rate used.
image
image

See https://grafana.com/blog/2020/09/28/new-in-grafana-7.2-__rate_interval-for-prometheus-rate-queries-that-just-work/

The problem is that $__rate_interval is a grafana only feature and can not be used for raw prometheus queries. This change converts dataAPI metrics to use the auto variable rate based on query interval length and changes the default rate from 2m to 4m to match what $__rate_interval does under the covers.

Use 4m for < 7d time interval
Use 11m for >= 7d time interval

10m (note $__rate_interval matches 4m perfectly)
image
30m (note $__rate_interval matches 4m perfectly)
image
1h (note $__rate_interval matches 4m perfectly)
image
12h (note $__rate_interval matches 4m perfectly)
image
24h (note $__rate_interval matches 4m perfectly)
image
7d (note $__rate_interval matches 11m perfectly)
image

Why are these changes needed?

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

…nterval

DA internal dashboard blob throughput does not match blob explorer throughput graphs because dataapi query uses 2m rate interval and DA dashboard uses auto `$__rate_interval`

See https://grafana.com/blog/2020/09/28/new-in-grafana-7.2-__rate_interval-for-prometheus-rate-queries-that-just-work/

The problem is that `$__rate_interval` is a grafana only feature and can not be used for raw prometheus queries. This change converts dataAPI metrics to use the auto variable rate based
on query interval length and changes the default rate from 2m to 4m to match what `$__rate_interval` does under the covers.

Use `4m` for < 7d time interval
Use `11m` for >= 7d time interval
@pschork pschork force-pushed the pschork/metrics_v2 branch from 3aa6744 to d1484e7 Compare June 26, 2024 21:29
@pschork pschork marked this pull request as ready for review June 26, 2024 21:48
@pschork pschork requested a review from jianoaix June 26, 2024 21:48
Copy link
Contributor

@jianoaix jianoaix left a comment

Choose a reason for hiding this comment

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

LGTM!

@pschork pschork merged commit 65b5725 into master Jun 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants