Skip to content

Conversation

@juissi-t
Copy link
Contributor

@juissi-t juissi-t commented Sep 2, 2025

Description

Previously, when aggregating exponential histogram data points which have different offsets in the transform or metricstransform processors, the processor would not aggregate the data points. Follow-up processors, such as deltatocumulative, might then drop some of the data points, leading to wrong metrics values being sent forward.

This pull request adjusts the bucket counts in each data point to match each other, which allows all the data points in a group to be aggregated correctly to a single data point, regardless of the offset. The offset of that data point is set to the minimum offset encountered in the different data points and zero buckets are trimmed away from the front of the list.

(Side note: I'm quite inexperienced at Golang, so please let me know if I did something stupid in the code. 🙏)

Testing

New test testDataExpHistogramWithDifferentOffsets is added. Additionally, this has been running in our test environment with real data from datadog receiver getting aggregated correctly.

@juissi-t juissi-t requested a review from a team as a code owner September 2, 2025 05:47
@juissi-t juissi-t requested a review from bogdandrutu September 2, 2025 05:47
@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Sep 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2025

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@juissi-t juissi-t force-pushed the fix-exp-hist-aggregation-offsets branch from e9e9c9e to 349413b Compare September 2, 2025 05:51
@atoulme atoulme merged commit cf807f7 into open-telemetry:main Sep 2, 2025
184 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 2, 2025
@juissi-t juissi-t deleted the fix-exp-hist-aggregation-offsets branch September 3, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time contributor PRs made by new contributors internal/core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants