opentracing-contrib / java-web-servlet-filter

OpenTracing Java Web Servlet Filter Instrumentation
Apache License 2.0
24 stars 31 forks source link

Use more recent java.servlet API 3.1.0 #53

Closed pmaciolek closed 5 years ago

pmaciolek commented 5 years ago

Perhaps we could bump the servlet specification to a more recent version? 3.0.1 is quite old, 3.1.0 is more recent but perhaps the project could move all the way forward to 4.0.1?

pavolloffay commented 5 years ago

If we don't need 4.x API then I would prefer to stay on 3.x for wider adoption and support.

pmaciolek commented 5 years ago

That is a question I am asking myself too - i.e. if it would be better to go with 3.1 or 4.0. From what I have seen, the API is mostly about adding new items rather than making incompatible changes but I am not an Java EE expert.

BTW, my original use case was that one of the attributes was not visible (as it was added only in 3.1). There are some updates with HTTP/2 handling in 4.0, I am wonder what sort of impact might that have.

pavolloffay commented 5 years ago

I am fine with bumping it to 3.1.0. Anyways the API should be provided by runtime/app server so this library should not affect your deployment. We should use the lowest level possible for better compatibility (if we can).

pavolloffay commented 5 years ago

Yeah we set it to provided https://github.com/opentracing-contrib/java-web-servlet-filter/blob/master/opentracing-web-servlet-filter/pom.xml#L48

pmaciolek commented 5 years ago

Got it, just updated the commit to use 3.1.0.

I proposed another set of changes for specialagent (for web servlet filtering rules) where I used 3.1.0 too: https://github.com/opentracing-contrib/java-specialagent/pull/47/files