opentracing-contrib / java-jdbc

OpenTracing Instrumentation for JDBC
Apache License 2.0
82 stars 56 forks source link

TracingConnection improvement #26

Closed wuyupengwoaini closed 5 years ago

wuyupengwoaini commented 5 years ago

When i use OpenTracing Spring Cloud project to trace jdbc,and i find the problem JdbcAspect.getConnectionwill executeSELECT USER()` every time

But i also think it is so hard to opentracing-spring-cloud-jdbc-starter to fix this issue,beacause the java class TracingConnnection's Construction method must need username.So could TracingConnnection's Construction method receive the object containing all the database info.and The JdbcTracingUtils convert the object to the k-v tags

malafeev commented 5 years ago

@wuyupengwoaini it's not clear for me, could you submit PR with tests to see the issue?

wuyupengwoaini commented 5 years ago

https://github.com/opentracing-contrib/java-jdbc/pull/27 @malafeev

malafeev commented 5 years ago

thanks @wuyupengwoaini, I will review it

malafeev commented 5 years ago

PR is merged