-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[processor/metricstransform]: Add scaling exponential histogram support #34039
[processor/metricstransform]: Add scaling exponential histogram support #34039
Conversation
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.
The code looks sane, but I need help from someone who understands about histograms.
@carrieedwards, are you available to review this one?
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 looks good to me. I would just consider adding a comment about how there is an inherent loss of accuracy with transform exponential histogram buckets.
Done :) |
@jpkrohling @dmitryax the PR is ready for another review / to be merged |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
…rt (open-telemetry#34039) **Description:** This PR adds support for the exponential histograms for the `experimental_scale_value` in the metricstransformprocessor. The scaling works by scaling the middle value of the first bucket (the one that corresponds to the offset) and finding the offset corresponding to this new value (the method used is described here: https://opentelemetry.io/docs/specs/otel/metrics/data-model/#all-scales-use-the-logarithm-function). The buckets are actually unchanged because they are "shifted" by the new offset. I initially remapped all the values but I ended up always having the same buckets so I left the buckets untouched to make the code simpler and save on performance. **Link to tracking Issue:** open-telemetry#29803 **Testing:** unit test + e2e local test
Description: This PR adds support for the exponential histograms for the
experimental_scale_value
in the metricstransformprocessor.The scaling works by scaling the middle value of the first bucket (the one that corresponds to the offset) and finding the offset corresponding to this new value (the method used is described here: https://opentelemetry.io/docs/specs/otel/metrics/data-model/#all-scales-use-the-logarithm-function).
The buckets are actually unchanged because they are "shifted" by the new offset. I initially remapped all the values but I ended up always having the same buckets so I left the buckets untouched to make the code simpler and save on performance.
Link to tracking Issue: #29803
Testing: unit test + e2e local test