Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance API to inject specific tracer instance into #16

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

dleischnig
Copy link
Contributor

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)

@malafeev malafeev self-requested a review August 29, 2018 13:44
@coveralls
Copy link

Pull Request Test Coverage Report for Build 64

  • 32 of 50 (64.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.07%) to 24.309%

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%
Totals Coverage Status
Change from base Build 63: 1.07%
Covered Lines: 132
Relevant Lines: 543

💛 - Coveralls

@malafeev malafeev merged commit b45d56d into opentracing-contrib:master Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants