-
Notifications
You must be signed in to change notification settings - Fork 679
feat(docs): document classic vs NHCB query result expectations #13689
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
base: main
Are you sure you want to change the base?
Conversation
|
💻 Deploy preview available (feat(docs): document classic vs NHCB query result expectations): |
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
33fe227 to
bbf7c63
Compare
tacole02
left a comment
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.
Docs look good! I left a few minor suggestions. Thank you, @krajorama !
|
|
||
| * [ENHANCEMENT] Add Azure object store workload identity example configuration. #13135 | ||
| * [ENHANCEMENT] Ruler: clarify that internal distributor applies to both operational modes. #13300 | ||
| * [ENHANCEMENT] Native histograms: set expectations on querying classic histograms versus NHCBs. #13689 |
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.
| * [ENHANCEMENT] Native histograms: set expectations on querying classic histograms versus NHCBs. #13689 | |
| * [ENHANCEMENT] Native histograms: Set expectations on querying classic histograms versus NHCBs. #13689 |
|
|
||
| ## Query result equivalence | ||
|
|
||
| NHCBs contain the same information as classic histograms, however that doesn't mean that all queries return exactly the same result. Here are some edge cases when query results may be different. |
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.
| NHCBs contain the same information as classic histograms, however that doesn't mean that all queries return exactly the same result. Here are some edge cases when query results may be different. | |
| NHCBs contain the same information as classic histograms. However, this doesn't mean that all queries return exactly the same result. Here are some edge cases when query results may be different: |
|
|
||
| NHCBs contain the same information as classic histograms, however that doesn't mean that all queries return exactly the same result. Here are some edge cases when query results may be different. | ||
|
|
||
| - Classic histograms are stored in independent series which might be lost or delayed independently from each other, whereas NHCBs are stored in a single series. This means that a classic histogram might be inconsistent compared to an NHCB and query results will be different. |
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.
| - Classic histograms are stored in independent series which might be lost or delayed independently from each other, whereas NHCBs are stored in a single series. This means that a classic histogram might be inconsistent compared to an NHCB and query results will be different. | |
| - Classic histograms are stored in independent series which might be lost or delayed independently from each other, whereas NHCBs are stored in a single series. This means that a classic histogram might be inconsistent compared to an NHCB and query results might differ. |
| NHCBs contain the same information as classic histograms, however that doesn't mean that all queries return exactly the same result. Here are some edge cases when query results may be different. | ||
|
|
||
| - Classic histograms are stored in independent series which might be lost or delayed independently from each other, whereas NHCBs are stored in a single series. This means that a classic histogram might be inconsistent compared to an NHCB and query results will be different. | ||
| - In a normal case when classic histograms series are not lot or delayed, the bucket counts, overall count and sum of observation will be equal between the classic histograms and NHCBs. |
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.
| - In a normal case when classic histograms series are not lot or delayed, the bucket counts, overall count and sum of observation will be equal between the classic histograms and NHCBs. | |
| - In a normal case when classic histograms series are not lost or delayed, the bucket counts, overall count, and sum of observations are equal between the classic histograms and NHCBs. |
|
|
||
| - Classic histograms are stored in independent series which might be lost or delayed independently from each other, whereas NHCBs are stored in a single series. This means that a classic histogram might be inconsistent compared to an NHCB and query results will be different. | ||
| - In a normal case when classic histograms series are not lot or delayed, the bucket counts, overall count and sum of observation will be equal between the classic histograms and NHCBs. | ||
| - Rate, increase, and delta calculation results might differ even when both the classic histograms and NHCBs are in sync. This occurs when the rate interval overlaps with one or more buckets transitioning from being empty to being in use, which can happen if the series just came into existence or when buckets transition from 0 value to some positive value. The reason is that the PromQL function [`rate`](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate) and related functions use extrapolation that is applied to classic histograms series independently resulting in potentially different 0 points and slope being calculated. For NHCBs the extrapolation is consistent across all buckets. |
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.
| - Rate, increase, and delta calculation results might differ even when both the classic histograms and NHCBs are in sync. This occurs when the rate interval overlaps with one or more buckets transitioning from being empty to being in use, which can happen if the series just came into existence or when buckets transition from 0 value to some positive value. The reason is that the PromQL function [`rate`](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate) and related functions use extrapolation that is applied to classic histograms series independently resulting in potentially different 0 points and slope being calculated. For NHCBs the extrapolation is consistent across all buckets. | |
| - Rate, increase, and delta calculation results might differ, even when both the classic histograms and NHCBs are in sync. This occurs when the rate interval overlaps with one or more buckets transitioning from being empty to being in use. This can happen if the series just came into existence or when buckets transition from a value of `0` to a positive value. The reason is that the PromQL function [`rate`](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate) and related functions use extrapolation that is applied to classic histograms series independently resulting in potentially different calculations for `0` points and slopes. For NHCBs, the extrapolation is consistent across all buckets. |
| - Classic histograms are stored in independent series which might be lost or delayed independently from each other, whereas NHCBs are stored in a single series. This means that a classic histogram might be inconsistent compared to an NHCB and query results will be different. | ||
| - In a normal case when classic histograms series are not lot or delayed, the bucket counts, overall count and sum of observation will be equal between the classic histograms and NHCBs. | ||
| - Rate, increase, and delta calculation results might differ even when both the classic histograms and NHCBs are in sync. This occurs when the rate interval overlaps with one or more buckets transitioning from being empty to being in use, which can happen if the series just came into existence or when buckets transition from 0 value to some positive value. The reason is that the PromQL function [`rate`](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate) and related functions use extrapolation that is applied to classic histograms series independently resulting in potentially different 0 points and slope being calculated. For NHCBs the extrapolation is consistent across all buckets. | ||
| - In general the PromQL warning "input to histogram_quantile needed to be fixed for monotonicity" that sometimes happens for classic histograms should not happen for NHCBs as NHCBs are atomic, self consistent and extrapolated consistently. |
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.
| - In general the PromQL warning "input to histogram_quantile needed to be fixed for monotonicity" that sometimes happens for classic histograms should not happen for NHCBs as NHCBs are atomic, self consistent and extrapolated consistently. | |
| - In general, the PromQL warning "input to histogram_quantile needed to be fixed for monotonicity" that sometimes happens for classic histograms should not happen for NHCBs, as NHCBs are atomic, self-consistent, and extrapolated consistently. |
beorn7
left a comment
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.
Approving for technically correct content. I leave language to the experts. :)
What this PR does
Set expectations on classic histograms vs NHCBs when it comes to query results.
Which issue(s) this PR fixes or relates to
Related to #7154
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]. If changelog entry is not needed, please add thechangelog-not-neededlabel to the PR.about-versioning.mdupdated with experimental features.Note
Clarifies query result differences between classic histograms and NHCBs and records the change in the changelog.
## Query result equivalencesection todocs/sources/mimir/send/native-histograms/_custom_buckets.md, clarifying when queries over classic histograms vs NHCBs may differ (inconsistent series, rate/increase/delta extrapolation, monotonicity warning behavior).CHANGELOG.mdwith an enhancement entry noting the new guidance for native histograms vs NHCB queries.Written by Cursor Bugbot for commit bbf7c63. This will update automatically on new commits. Configure here.