Skip to content

Grafana builder: use $__rate_interval over $__interval #401

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 1 commit into from
Jan 14, 2021

Conversation

bergquist
Copy link
Contributor

Signed-off-by: bergquist [email protected]

@@ -399,23 +399,23 @@
nullPointMode: 'null as zero',
targets: [
{
expr: 'histogram_quantile(0.99, sum(rate(%s_bucket%s[$__interval])) by (le)) * %s' % [metricName, selector, multiplier],
expr: 'histogram_quantile(0.99, sum(rate(%s_bucket%s[$__rate_interval])) by (le)) * %s' % [metricName, selector, multiplier],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've never used histogram_quantile so I dont know if this makes sense.. But I dont see why It wouldn't 🤷‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

@bergquist bergquist requested a review from tomwilkie January 12, 2021 12:32
@tomwilkie
Copy link
Contributor

When was rate_interval introduced? This will break people on old Grafana IIUC. Just want to make sure old in this context doesn't mean "last week".

@bergquist
Copy link
Contributor Author

It was introduced in Grafana 7.2.0 released (2020-09-23)

ref grafana/grafana#26937

@tomwilkie
Copy link
Contributor

Awesome, thanks Carl. I'll leave it to you to judge if 3 months is enough - this library is used by the k8s mixin, which is included in the kube-prometheus, which embeds grafana/grafana:7.3.5 in head (see https://github.com/prometheus-operator/kube-prometheus/blob/master/manifests/grafana-deployment.yaml). So I'd say LGTM

@bergquist
Copy link
Contributor Author

3 months in mixin lands is how many human years?

@bergquist bergquist merged commit fd1d2f7 into master Jan 14, 2021
@bergquist bergquist deleted the builder_rate_interval branch January 14, 2021 09:09
bboreham added a commit to grafana/cortex-jsonnet that referenced this pull request Aug 18, 2021
Brings in the following changes:
- Use default as a picker value for datasource variable grafana/jsonnet-libs#204
- allow table link in new tab grafana/jsonnet-libs#238
- allow setting a default datasource grafana/jsonnet-libs#301
- Add textPanel grafana/jsonnet-libs#341
- make status code label name overrideable in qpsPanel grafana/jsonnet-libs#397
- use $__rate_interval over $__interval grafana/jsonnet-libs#401
- Set shared tooltip to false by default grafana/jsonnet-libs#458
- Use custom 'all' value to avoid massive regexes in queries. grafana/jsonnet-libs#469

https://github.com/grafana/jsonnet-libs/commits/master/grafana-builder/
bboreham added a commit to grafana/cortex-jsonnet that referenced this pull request Aug 18, 2021
Brings in the following changes:
- Use default as a picker value for datasource variable grafana/jsonnet-libs#204
- allow table link in new tab grafana/jsonnet-libs#238
- allow setting a default datasource grafana/jsonnet-libs#301
- Add textPanel grafana/jsonnet-libs#341
- make status code label name overrideable in qpsPanel grafana/jsonnet-libs#397
- use $__rate_interval over $__interval grafana/jsonnet-libs#401
- Set shared tooltip to false by default grafana/jsonnet-libs#458
- Use custom 'all' value to avoid massive regexes in queries. grafana/jsonnet-libs#469

https://github.com/grafana/jsonnet-libs/commits/master/grafana-builder/
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