8000 Fix NPE when consuming kafka messages with null header by mznet · Pull Request #14332 · open-telemetry/opentelemetry-java-instrumentation · GitHub
[go: up one dir, main page]

Skip to content

Conversation

mznet
Copy link
Contributor
@mznet mznet commented Jul 25, 2025

According to issue #14329, when a kafka record with a null value is produced, KafkaConsumerRecordGetter throws a NPE. If kafka message header is set based on certain conditions (as assumed), there’s a risk that an unintended null value might be inserted, which could lead to an exception.

The associated PR suggests a solution for this, and I’ve added three additional modifications to handle the NPE when producing, context propagation, and receive span.

This PR fix #14329

@mznet mznet requested a review from a team as a code owner July 25, 2025 05:53
@mznet
Copy link
Contributor Author
mznet commented Jul 28, 2025

Build failed, but I can't determine whether it was due to timeout or some other issue.

@laurit
Copy link
Contributor
laurit commented Jul 28, 2025

Build failed, but I can't determine whether it was due to timeout or some other issue.

It failed due to a test failure. https://scans.gradle.com/s/3u7t6f5yiuy5e

@trask trask merged commit 9decdbe into open-telemetry:main Aug 5, 2025
89 checks passed
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.

NPE when KafkaConsumerRecordGetter call getAll
4 participants
0