Skip to content

Correctly export overflow histogram bucket over OTLP#11261

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
mcculls/fix-otlp-compact-histograms
May 4, 2026
Merged

Correctly export overflow histogram bucket over OTLP#11261
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
mcculls/fix-otlp-compact-histograms

Conversation

@mcculls
Copy link
Copy Markdown
Contributor

@mcculls mcculls commented May 3, 2026

Motivation

According to metrics.proto

The number of elements in bucket_counts array must be by one greater than the number of elements in explicit_bounds array. The exception to this rule is when the length of bucket_counts is 0, then the length of explicit_bounds must also be 0.

What Does This Do

When exporting compact OTLP histograms we should omit the overflow bucket boundary of +Infinity, but still export the counts for that bucket. If the overflow bucket is missing from DDSketch (because it had no counts) then we should export a count of zero for it.

This guarantees the expected behaviour that

len(bucket_counts) == len(bucket_boundaries) + 1

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@mcculls mcculls requested review from a team as code owners May 3, 2026 00:17
@mcculls mcculls added the type: bug Bug report and fix label May 3, 2026
@mcculls mcculls requested a review from mhlidd May 3, 2026 00:17
@mcculls mcculls added the inst: opentelemetry OpenTelemetry instrumentation label May 3, 2026
@mcculls mcculls changed the title Fix OTLP compact histograms Correctly export overflow histogram bucket over OTLP May 3, 2026
@PerfectSlayer
Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 4, 2026

View all feedbacks in Devflow UI.

2026-05-04 12:37:57 UTC ℹ️ Start processing command /merge


2026-05-04 12:38:01 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-05-04 13:55:20 UTC ℹ️ MergeQueue: This merge request was merged

@PerfectSlayer
Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 4, 2026

View all feedbacks in Devflow UI.

2026-05-04 12:38:02 UTC ℹ️ Start processing command /merge


2026-05-04 12:38:04 UTC ❌ MergeQueue

PR already in the queue with status in_progress

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit ba9194e into master May 4, 2026
575 of 578 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the mcculls/fix-otlp-compact-histograms branch May 4, 2026 13:55
@github-actions github-actions Bot added this to the 1.62.0 milestone May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: opentelemetry OpenTelemetry instrumentation type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants