Skip to content

fix(telemetrygen): fix histogram data points to comply with spec #39025

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 2 commits into from
Mar 27, 2025

Conversation

ianwilkes
Copy link
Contributor

Description

The HistogramDataPoint message has a couple of clear rules: the Count field must equal the total count of all buckets (if present), and the length of the bucket array must be one greater than the length of the boundary array. This fixes the telemetrygen histograms to conform to these rules.

See https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L443

@ianwilkes ianwilkes requested review from mx-psi, codeboten and a team as code owners March 27, 2025 22:22
Copy link

linux-foundation-easycla bot commented Mar 27, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the cmd/telemetrygen telemetrygen command label Mar 27, 2025
@github-actions github-actions bot requested a review from Erog38 March 27, 2025 22:23
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @ianwilkes! if you can add a changelog entry and mark this as a bugfix for the telemetrygen component, that'd be fantastic

I see you already submitted a changelog :D

@codeboten codeboten merged commit 49ccc5d into open-telemetry:main Mar 27, 2025
170 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 27, 2025
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…n-telemetry#39025)

#### Description
The HistogramDataPoint message has a couple of clear rules: the Count
field must equal the total count of all buckets (if present), and the
length of the bucket array must be one greater than the length of the
boundary array. This fixes the telemetrygen histograms to conform to
these rules.

See
https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/telemetrygen telemetrygen command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants