fix NPE when exception message is null#280
Conversation
|
Can you release a patch version after this is merged? We are facing this issue in production and would like to update to check if it is going to work well. |
0896ccd to
9f2dbcd
Compare
shakuzen
left a comment
There was a problem hiding this comment.
It seems like a good change to make regardless. Though I am curious what is causing the CancellationException. Is it a timeout on the sender you're using?
|
Are you able to try with 3.5.1-SNAPSHOT to make sure this completely fixes the issue you were seeing before we make a new release? Are you able to reproduce the issue outside of production? |
|
@shakuzen, sorry for the late reply, I was travelling. As for the reason for the Another speculation of mine is that after the NPE, the thread was stopped and not started again, so the service stopped exporting spans. But that is a very wild speculation, as I don't really understand how the exporter behaves under the hood. The version Thank you very much for your fast approval on this PR! |
Yes, that's the behavior that will happen with this kind of exception. See this part of the code. Thanks for trying it out. I'll try to work on a release today. |
|
3.5.1 is available in Maven Central now with this fix. |

When the Exception is an
IllegalStateExceptionand does not have a message, it is causing an NPE like we were having in our projectsIn our case, it was a
java.util.concurrent.CancellationExceptionI am not sure because I cannot prove, but after we get this error, our pods stop exporting spans to zipkin. We loose all the observability after this NPE.
PS: our stack is: Java 21, Spring boot 3.4.5 with 'io.micrometer:micrometer-tracing-bridge-brave', 'io.zipkin.reporter2:zipkin-reporter-brave'