Closed dleischnig closed 6 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/main/java/io/opentracing/contrib/jdbc/JdbcTracingUtils.java | 17 | 19 | 89.47% | ||
src/main/java/io/opentracing/contrib/jdbc/TracingCallableStatement.java | 0 | 3 | 0.0% | ||
src/main/java/io/opentracing/contrib/jdbc/TracingPreparedStatement.java | 3 | 6 | 50.0% | ||
src/main/java/io/opentracing/contrib/jdbc/TracingStatement.java | 7 | 17 | 41.18% | ||
<!-- | Total: | 32 | 50 | 64.0% | --> |
Totals | |
---|---|
Change from base Build 63: | 1.07% |
Covered Lines: | 132 |
Relevant Lines: | 543 |
Currently java-jdbc only supports tracer instance distribution through static GlobalTracer mechanism.
To support distribution by injection API has been enhanced. In case no tracer is injected backward compatibility is kept by fallback to GlobalTracer.get().
This allows to write unittests, for java-jdbc and components that use this lib, without usage of reflection to reset GlobalTracer registration.
Furthermore it allows to use this integration lib within software where GlobalTracer.get() can't be used. (limitation: the component has to have access to connection creation code)