Skip to content
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

NullPointerException on the Kafka Consumer instrumentation #1267

Closed
ivantopo opened this issue Mar 27, 2023 · 0 comments · Fixed by #1269
Closed

NullPointerException on the Kafka Consumer instrumentation #1267

ivantopo opened this issue Mar 27, 2023 · 0 comments · Fixed by #1269
Labels
Enterprise Support Marks issues with higher priority due to Enterprise/APM support agreements

Comments

@ivantopo
Copy link
Contributor

A Kamon APM user reported the issue below. I think it is related to having the Kafka Consumer instrumentation enabled but the consumed messages don't have the Kamon Context.

java.lang.NullPointerException: Cannot invoke "kamon.context.Context.get(kamon.context.Context$Key)" because "incomingContext" is null
at kamon.instrumentation.kafka.client.KafkaInstrumentation$.consumerSpan(KafkaInstrumentation.scala:185)
at kamon.instrumentation.kafka.client.KafkaInstrumentation$.runWithConsumerSpan(KafkaInstrumentation.scala:126)
at kamon.instrumentation.kafka.client.KafkaInstrumentation$.runWithConsumerSpan(KafkaInstrumentation.scala:106)
@ivantopo ivantopo added the Enterprise Support Marks issues with higher priority due to Enterprise/APM support agreements label Mar 27, 2023
@ivantopo ivantopo linked a pull request Mar 27, 2023 that will close this issue
ivantopo added a commit that referenced this issue Apr 4, 2023
solnaranu pushed a commit to solnaranu/Kamon that referenced this issue May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enterprise Support Marks issues with higher priority due to Enterprise/APM support agreements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant