Skip to content

otlptranslator: fix silently swallowed error in addSumNumberDataPoints#17954

Merged
aknuds1 merged 1 commit intoprometheus:mainfrom
aknuds1:fix/otlptranslator-error-handling
Jan 28, 2026
Merged

otlptranslator: fix silently swallowed error in addSumNumberDataPoints#17954
aknuds1 merged 1 commit intoprometheus:mainfrom
aknuds1:fix/otlptranslator-error-handling

Conversation

@aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Jan 28, 2026

Which issue(s) does the PR fix:

Fixes #17953

Does this PR introduce a user-facing change?

[BUGFIX] OTLP: Fix potential silent data loss for sum metrics

Description

The createAttributes error in addSumNumberDataPoints was incorrectly returning nil instead of err, causing errors to be silently discarded. This was introduced in #16951 during a refactor.

This fix aligns the error handling with addGaugeNumberDataPoints in the same file, which correctly returns the error.

The createAttributes error was incorrectly returning nil instead of err,
causing errors to be silently discarded. This could lead to silent data
loss for sum metrics during OTLP ingestion.

Fixes prometheus#17953

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

LGTM, I would only suggest some tweaks to the release notes to be more user-friendly. The current one feels too developer-focused.

What do you think about:

[BUGFIX] OTLP: Fix potential silent data loss for sum metrics.

@aknuds1
Copy link
Contributor Author

aknuds1 commented Jan 28, 2026

@ArthurSens Done, thanks.

@aknuds1 aknuds1 merged commit dc34b90 into prometheus:main Jan 28, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

otlptranslator: Error silently swallowed in addSumNumberDataPoints

2 participants