java-jdbc icon indicating copy to clipboard operation
java-jdbc copied to clipboard

hard coded JdbcTracingUtils

Open wcarmon opened this issue 6 years ago • 5 comments
trafficstars

Most of the other opentracing contrib projects use a SpanDecorator so users can customize the span.

Is there any reason you have hard-coded JdbcTracingUtils.on*() instead of the SpanDecorator pattern?

Examples:

  • https://github.com/opentracing-contrib/java-spring-web/blob/master/opentracing-spring-web/src/main/java/io/opentracing/contrib/spring/web/client/RestTemplateSpanDecorator.java
  • https://github.com/opentracing-contrib/java-spring-web/blob/master/opentracing-spring-web/src/main/java/io/opentracing/contrib/spring/web/interceptor/HandlerInterceptorSpanDecorator.java
  • https://github.com/opentracing-contrib/java-web-servlet-filter/blob/master/opentracing-web-servlet-filter/src/main/java/io/opentracing/contrib/web/servlet/filter/ServletFilterSpanDecorator.java
  • https://github.com/opentracing-contrib/java-okhttp/blob/master/opentracing-okhttp3/src/main/java/io/opentracing/contrib/okhttp3/OkHttpClientSpanDecorator.java

wcarmon avatar Dec 28 '18 15:12 wcarmon

To be honest it looked redundant for me. If it's useful please submit PR.

malafeev avatar Dec 28 '18 16:12 malafeev

Happy new year :-)

It will take me a few days to propose a clean refactoring for SpanDecorators.

Thanks for releasing the changes I sent previously.

wcarmon avatar Jan 01 '19 19:01 wcarmon

To be honest it looked redundant for me.

It allows customization which would make this library infinitely more useful. Related to https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle

whiskeysierra avatar Aug 07 '19 07:08 whiskeysierra

PR is welcome

malafeev avatar Aug 07 '19 07:08 malafeev

I'm wondering is this really important? could somebody show me valid use case.

quaff avatar Sep 14 '20 08:09 quaff