-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Make rate possible non-counter annotation consistent #14910
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously a PossibleNonCounterInfo annotation would be left in cases where a range-vector selects 1 float data point, even if no more points are selected in order to calculate a rate. This change ensures an output float exists before emitting such an annotation. This fixes an inconsistency where a series with mixed data (ie, a float and a native histogram) would emit an annotation without any points. For example, ``` load 1m series{label="a"} 1 {{schema:1 sum:10 count:5 buckets:[1 2 3]}} eval instant at 1m rate(series[1m1s]) ``` Would have a PossibleNonCounterInfo annotation. Wheras ``` load 1m series{label="a"} {{schema:1 sum:10 count:5 buckets:[1 2 3]}} {{schema:1 sum:15 count:10 buckets:[1 2 3]}} eval instant at 1m rate(series[1m1s]) ``` Would not. Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
4 tasks
aknuds1
reviewed
Sep 16, 2024
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
e1bf605
to
9f11b0b
Compare
aknuds1
reviewed
Sep 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please see comments. I'm also wondering if a changelog entry isn't warranted?
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
aknuds1
approved these changes
Sep 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
charleskorn
added a commit
to grafana/mimir
that referenced
this pull request
Oct 3, 2024
1 task
charleskorn
added a commit
to grafana/mimir
that referenced
this pull request
Oct 4, 2024
charleskorn
added a commit
to grafana/mimir
that referenced
this pull request
Oct 4, 2024
* Update to latest mimir-prometheus * Add changelog entries * Address PR feedback: improve changelog entries Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com> * Fix breaking change * Bring in grafana/mimir-prometheus#705 too * Adjust behaviour to match prometheus/prometheus#14821 * Re-enable tests now that we have prometheus/prometheus#14910 * Add more changelog entries --------- Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
bboreham
pushed a commit
to bboreham/prometheus
that referenced
this pull request
Oct 22, 2024
* Make rate possible non-counter annotation consistent Previously a PossibleNonCounterInfo annotation would be left in cases where a range-vector selects 1 float data point, even if no more points are selected in order to calculate a rate. This change ensures an output float exists before emitting such an annotation. This fixes an inconsistency where a series with mixed data (ie, a float and a native histogram) would emit an annotation without any points. For example, ``` load 1m series{label="a"} 1 {{schema:1 sum:10 count:5 buckets:[1 2 3]}} eval instant at 1m rate(series[1m1s]) ``` Would have a PossibleNonCounterInfo annotation. Wheras ``` load 1m series{label="a"} {{schema:1 sum:10 count:5 buckets:[1 2 3]}} {{schema:1 sum:15 count:10 buckets:[1 2 3]}} eval instant at 1m rate(series[1m1s]) ``` Would not. --------- Signed-off-by: Joshua Hesketh <josh@nitrotech.org> # Conflicts: # CHANGELOG.md
julienduchesne
pushed a commit
to julienduchesne/prometheus
that referenced
this pull request
Dec 13, 2024
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously a PossibleNonCounterInfo annotation would be left in cases where a range-vector selects 1 float data point, even if no more points are selected in order to calculate a rate.
This change ensures an output float exists before emitting such an annotation.
This fixes an inconsistency where a series with mixed data (ie, a float and a native histogram) would emit an annotation without any points.
For example,
Would have a PossibleNonCounterInfo annotation.
Wheras
Would not.