Skip to content

[exporters] Native Marshallers should always write SUM#8107

Open
mosesn wants to merge 1 commit intoopen-telemetry:mainfrom
mosesn:mosesn/fix-sum-bug-exp-marshaler
Open

[exporters] Native Marshallers should always write SUM#8107
mosesn wants to merge 1 commit intoopen-telemetry:mainfrom
mosesn:mosesn/fix-sum-bug-exp-marshaler

Conversation

@mosesn
Copy link

@mosesn mosesn commented Feb 19, 2026

Problem

We found that sometimes we would export bad values from otel when the sum was 0 when we were also exporting deltas. My colleague @natasha-aleksandrova found that this was because the native histogram marshalers would omit the sum, since they were using the old serializeDouble method, instead of serializeDoubleOptional.

Solution

Update the marshallers to use serializeDoubleOptional and add a test. I confirmed that the test fails before the change, and passes after the change.

Result

The native marshalers properly export the histogram even when the sum is 0!

@mosesn mosesn requested a review from a team as a code owner February 19, 2026 23:32
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 19, 2026

CLA Not Signed

@mosesn mosesn force-pushed the mosesn/fix-sum-bug-exp-marshaler branch from aafdb80 to cb1462b Compare February 19, 2026 23:34
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.32%. Comparing base (284a64f) to head (cb1462b).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8107   +/-   ##
=========================================
  Coverage     90.32%   90.32%           
  Complexity     7607     7607           
=========================================
  Files           839      839           
  Lines         22888    22888           
  Branches       2283     2283           
=========================================
  Hits          20673    20673           
  Misses         1506     1506           
  Partials        709      709           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jack-berg
Copy link
Member

@mosesn can you sign the CLA? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments