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

Make interceptor mode of TracingDriver work with other wrapper drivers #69

Merged
merged 1 commit into from Feb 28, 2020

Conversation

yisheng-liang
Copy link
Contributor

Problem

In the interceptor mode ofTracingDriver, it is supposed to be able to trace JDBC connections without modifying the URL. However, this may not work in some cases. For instance, if another wrapper driver calls Driver#acceptsURL for each registered driver in order to find the underlying driver, it won't see TracingDriver unless the JDBC URL has been rewritten to have the jdbc:tracing: prefix.

Solution

In interceptor mode, TracingDriver#acceptsURL should accept any JDBC URL. The user should not need to (and should not) modify the URL for the interceptor mode to work. Also, in interceptor mode, TracingDriver should not try to extract withActiveSpanOnly or ignoreStatements properties from the URL, as they should be set via TracingDriver#setInterceptorProperty.

Fixes #68.

@yisheng-liang yisheng-liang changed the title Make interceptor mode of TracingDriver work with other wrapper drivers (#68) Make interceptor mode of TracingDriver work with other wrapper drivers Feb 28, 2020
@coveralls
Copy link

Pull Request Test Coverage Report for Build 240

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 46.543%

Totals Coverage Status
Change from base Build 238: 0.1%
Covered Lines: 451
Relevant Lines: 969

💛 - Coveralls

@malafeev malafeev merged commit 040ad04 into opentracing-contrib:master Feb 28, 2020
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.

In interceptor mode, TracingDriver#acceptsURL should accept URLs without "tracing:"
3 participants