-
Notifications
You must be signed in to change notification settings - Fork 33
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
Integrate with servlet filter #13
Comments
@pavolloffay, for the first point, does adding the @PreMatching so that the filter is called before any attempt to match the URL would work ? |
@hypnoce I don't know. It probably could work. If I understand it correctly by default jaxrs filters are executed at post-match request extension point. And priority [2] defines the order for each extension point. https://docs.oracle.com/javaee/7/api/javax/ws/rs/Priorities.html [1] https://docs.oracle.com/javaee/7/api/javax/ws/rs/container/ContainerRequestFilter.html |
Recently when I was working on Opentracing in Dropwizard project I noticed that jaxrs and servlet integrations do not play well together, i.e. jaxrs-integration spans are not children of servlet-integration created spans. Maybe original idea was that you should have only one of them installed but not all endpoints have to be handled by jaxrs so it is beneficial to have both. My idea would be to modify jaxrs integration in such a way that:
I can work on it in my spare time, but the question is: does it make sense for you? |
From my perspective I do not see anything that can go wrong. They should play well together. |
@tmszdmsk There is one problem. This instrumentation supports |
@pavolloffay Shouldn't it be a concern of servlet filter and the developer who is using it? It won't enable servlet filter OOTB, my solution just improves coexistence of two integrations. |
But, as @hypnoce said, it is a different issue than originally reported. I will create a separate ticket. |
Jax-rs instrumentation cannot trace all request:
I propose to use servlet filter in conjunction with jax-rs filters. However, jax-rs filters should work alone too, but when there is a span created in filter it should be respected.
The text was updated successfully, but these errors were encountered: