-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
smallrye-jwt can not be used with JAX-RS and smallrye-open-tracing #5419
Comments
Thank you @sberyozkin |
Some other datapoints... the quarkus:dev maven extension apparently pulls in some dependencies that the application doesnt need. Which causes it to pull in a servlet implementation and undertow. When not using the quarkus:dev plugin, you dont get the ClassNotFoundException above. Only when running "test" do you see that error. |
Also, simply adding the opentracing extension to my pom file, COMPLETELY changes the execution of the webservice. I added 'new Throwable().printStackTrace() without opentracing:
With opentracing
|
@stuartwdouglas looks like we missed OpenTracing when working on the new HTTP layer and it still depends on Undertow. Is it something we should fix before Final? |
BTW, apart from that, shouldn't the smallrye-jwt extension work with Undertow anyway? I think we have 2 different issues here. |
@patriot1burke do you have any ideas how to make this work? This is implemented as a combination of RESTEasy feature + Servlet filter. The Feature seems to start the tracing, then it relies on the Servlet filter to either close it or register a listener to close it when the request is done. Is it possible to do this all in RESTeasy? |
The servlet filter is used because JAX-RS response filter is not being invoked if there is an exception thrown during the invocation. The servlet filter is only used to finish the span and log exceptions (if any). If RestEasy or any other underlying stack provides API to wire in after the request processing the fix should be easy. Servlet filter: |
@gsmet |
@pavolloffay IIRC, JAX-RS response filters should be run no matter what, even if there is an exception thrown from the method. |
@patriot1burke Just checked, the Tried out the example from the original issue, and the tracing information is still recorded, including the exception (stream closed): The other interesting thing is that not all endpoints are causing the exception: (using the |
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
Unfortunately, this is not true for any JAX-RS implementation I could find. |
@pavolloffay I'd expect this to work as well (with at least one implementation I'm aware of), the exception has to be mapped, either to a custom or default exception (WebApplicationException) and the exceptional Response - routed through the response filters. CC @asoldano - Hi Alessio, FYI, is there a way to make it work with RestEasy ? |
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
I think so, but we'd have to try. Is this still relevant, given the PR is now closed? |
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
This is no longer needed after the changes in how challenges are handled. Partial fix for #5419
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
@asoldano IIRC there were problems with using default exception mapper. E.g. we do not what to annotate span with an error for an application-specific exception which is properly handled and does not result in an error code. Other issue might be - is the default exception mapper invoked if there is an exception mapper for a specific exception? Feel free to move this to https://github.com/opentracing-contrib/java-jaxrs or create a PR :) |
This is no longer needed after the changes in how challenges are handled. Partial fix for quarkusio#5419
Describe the bug
See quarkusio/quarkus-quickstarts#369
Expected behavior
Excluding
quarkus-undertow
should be enough. (it should probably be excluded fromquarkus-smallrye-opentracing
)Actual behavior
Adding
to https://github.com/quarkusio/quarkus-quickstarts/blob/development/security-jwt-quickstart/pom.xml
cause the test failure with
The text was updated successfully, but these errors were encountered: