-
Notifications
You must be signed in to change notification settings - Fork 306
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
PAYARA-2924 NPE on JAX-RS Async-Server EE7 Sample #3041
PAYARA-2924 NPE on JAX-RS Async-Server EE7 Sample #3041
Conversation
Have you tested with versioned applications? I think you will get a clash. |
I went with using this method as it's essentially how they suggest you do it in OpenTracing. I'm not sure where I'd be getting a clash though, as the application name is only ever used for getting the Tracer instance, which is thread local anyway. |
Jenkins test please |
Quick build and test passed! |
Not yet, might look at that next version. |
If request tracing is turned on when running this sample, a NPE is thrown.
This is caused by the return happening on a separate thread, so the container filter gets a NPE when trying to get the access active span (as these are thread local).
This PR fixes this by saving the span context as an attribute of the InvocationContext object created by managed pools so that the span context can be propagated when setting up the thread context.
Threads from managed pools created external to Payara will not be traced however, such as those created by Jersey to handle timeouts.
This also adds the ability for OpenTracing to create traces itself (rather than requiring a trace to already be running), and includes a couple bits of cleanup.