java-web-servlet-filter icon indicating copy to clipboard operation
java-web-servlet-filter copied to clipboard

Keep interface clean

Open sydneyhenrard opened this issue 6 years ago • 2 comments

I noticed that several interfaces have anonymous implementation in it.

  • STANDARD_TAGS in ServletFilterSpanDecorator
  • STANDARD_LOGS in HandlerInterceptorSpanDecorator
  • HANDLER_METHOD_OPERATION_NAME in HandlerInterceptorSpanDecorator

Is there a reason?

I wanted to add queryString to Tags.HTTP_URL but since I can't extend STANDARD_TAGS, I have to create my own class and copy paste all methods and change what I need. If I could extend the class, I could have just override onRequest.

sydneyhenrard avatar Aug 24 '19 13:08 sydneyhenrard

There is no reason. We could provide a class which can be overridden.

pavolloffay avatar Aug 26 '19 11:08 pavolloffay

Are you willing to submit a PR. I would like to keep the constants to be backwards compatible.

pavolloffay avatar Aug 26 '19 11:08 pavolloffay