-
Notifications
You must be signed in to change notification settings - Fork 889
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
Add optional min and max fields to histogram data model. #1915
Conversation
If folks want to proceed with this change, I'd also like to update the model-data-histogram.png image, but don't have the original file. I can also update the changelog if necessary. |
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.
I think this PR needs to clarify in more details the correlation between these new fields and the temporality and how to calculate "delta -> cumulative -> delta"
Here's a proposal for how to handle "delta to cumulative" and "cumulative to delta" conversion. Cumulative to Delta ConversionSummary: The min / max on cumulative histograms include values recorded more recently than an unspecified max age. Assume the max age is equal to the cumulative collection interval.
Delta to Cumulative ConversionSummary: The min / max on cumulative histograms include values recorded more recently than an unspecified max age. Use the delta min / max values as is in the cumulative histogram, assuming the max age is equal to the delta window size.
Thoughts
|
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.
I think min/max need to abide by the aggregation temporality, just like all the other fields in histogram.
Just want to call out that if min/max abide by aggregation temporality and represent the cumulative min / max since recording began, then it's most reasonable to drop them when converting from cumulative to delta. The conversion from delta to cumulative is straight forward. |
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.
Please find my concerns and suggestions here https://github.com/open-telemetry/opentelemetry-specification/pull/1915/files#r710727328.
I'm skeptical about the resistance to this proposal. On the surface, remember that this discussion is meant to enable a MinMaxSumCount style of aggregation (i.e., a zero-bucket histogram). We want to encode Min/Max/Sum/Count without any further resolution, so the buckets of a histogram are not a substitute. We're interested in Min and Max quantiles specifically because they are mergeable. The comments above saying they are not mergeable address temporal aggregation, not spatial aggregation. Let's say there wasn't a cumulative temporality, and we were only discussing delta-temporality histograms. There's still a problem with temporal alignment, but it's not enough of a problem for me to discard the data. A great deal of metrics data will pass through temporal alignment before it is finally shown to the user. When splitting and merging deltas to perform realignment, the same problem shows up. Why is this such an obstacle? I think of Min and Max values as like Gauges. When it comes to merging multiple of them, you select the last value of each series. We can write rules for merging histograms of either temporality, always output the last value of the min/max that you have. |
@jmacd I commented here with my thoughts on the way forward. I think the major issue for us to figure out is basically: Should we leverage the natural mathematical function "min" as the merge algorithm for the value "min" on histogram (similarly for max)? I think it would be totally viable to say 'no' to this and make min/max have Gauge semantics within histogram (just like "sum" and "count" have Sum semantics). I do think the natural min/max functions have meaning, even spatially but perhaps there's a scenario I'm not thinking of. THis is why my bias is towards giving "min" and "max" their own aggregate function. Can you give me an example of spatial min-max merge where mathematical "min" and "max" wouldn't make sense? |
No, I believe these always make sense for spatial merge. I was proposing "Gauge semantics" as a trick to let min and max work for temporal aggregation, it's just careful language to allow delta temporality to do one thing and cumulative temporality to do another without breaking any definitions. 😀 If we defined the min/max to be interpreted over the window |
Discussed during the 9/21/21 Metrics SIG Meeting and concluded that @jack-berg will update the PR: Conclusion: |
I've updated the description of the min and max fields to reflect the conclusion of the 9/21 SIG meeting. |
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.
This LGTM now. If you'd like to update the pictures, ping me on slack and I'll get you access to the google drawing to reproduce them.
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.
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.
PR looks better, would prefer couple of days to think more on this but seems to be the right track
Dismiss the blocking, no longer reason to block, but not yet to approve :)
…try#1915) * Add optional min and max fields to histogram data model. * Fix lint error * Update histogram min and max definition per discussion * Format changelog to comply with line length recommendations * Update delta histogram image with min and max * Fix lint error * Revert "Fix lint error" This reverts commit 90f1c72 * Removing trailing space on line Co-authored-by: Josh Suereth <joshuasuereth@google.com>
Related to Issue #1902. See this convo as well.
Changes
Expand histogram description in metric datamodel to include optional min and max fields.
The Metric Points section of the data model is marked as stable, but I believe that the optional designation on these fields makes this a non breaking change.
Related issues #
N/A.