java-jdbc
java-jdbc copied to clipboard
hard coded JdbcTracingUtils
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
To be honest it looked redundant for me. If it's useful please submit PR.
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.
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
PR is welcome
I'm wondering is this really important? could somebody show me valid use case.