You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Similar to #4902, we are getting null pointers for what seems to be missing headers for the request, looking at the stack trace. In our case, the null pointer is thrown in RabbitDeliveryAttributesGetter.java instead of DeliveryRequestGetter.java as in the linked issue which was fixed by adding a null check https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/4903/files
Steps to reproduce
Consume a RabbitMQ event without headers
What did you expect to see?
Proceeding by ignoring missing headers instead of throwing java.lang.NullPointerException
What did you see instead?
Consumer io.opentelemetry.javaagent.instrumentation.rabbitmq.TracedDelegatingConsumer@2d2c535a (***) method handleDelivery for channel AMQChannel(amqp://*****@***.***.***.***:5672/,1) threw an exception for channel AMQChannel(amqp://*****@***.***.***.***:5672/,1)
java.lang.NullPointerException: null
at io.opentelemetry.javaagent.instrumentation.rabbitmq.RabbitDeliveryAttributesGetter.header(RabbitDeliveryAttributesGetter.java:93)
at io.opentelemetry.javaagent.instrumentation.rabbitmq.RabbitDeliveryAttributesGetter.header(RabbitDeliveryAttributesGetter.java:14)
at io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.messaging.MessagingAttributesExtractor.onEnd(MessagingAttributesExtractor.java:111)
at io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.Instrumenter.doEnd(Instrumenter.java:224)
at io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.Instrumenter.end(Instrumenter.java:144)
at io.opentelemetry.javaagent.instrumentation.rabbitmq.TracedDelegatingConsumer.handleDelivery(TracedDelegatingConsumer.java:76)
at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:149)
at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:104)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
What version are you using?
v1.22.1
Environment
Compiler: AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.3+7
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered:
Describe the bug
Similar to #4902, we are getting null pointers for what seems to be missing headers for the request, looking at the stack trace. In our case, the null pointer is thrown in
RabbitDeliveryAttributesGetter.java
instead ofDeliveryRequestGetter.java
as in the linked issue which was fixed by adding a null check https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/4903/filesSteps to reproduce
Consume a RabbitMQ event without headers
What did you expect to see?
Proceeding by ignoring missing headers instead of throwing java.lang.NullPointerException
What did you see instead?
What version are you using?
v1.22.1
Environment
Compiler: AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.3+7
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered: