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

Don't instrument jdbc wrapper classes #5012

Open
trask opened this issue Jan 5, 2022 · 0 comments
Open

Don't instrument jdbc wrapper classes #5012

trask opened this issue Jan 5, 2022 · 0 comments
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request

Comments

@trask
Copy link
Member

trask commented Jan 5, 2022

Is your feature request related to a problem? Please describe.

The jdbc instrumentation currently captures the outermost connection layer, which may be a wrapper, in which case the db.connection_string and derived db.system, net.peer.name, etc may be incorrect. See #4974 for more info.

Describe the solution you'd like
Only instrument the real underlying jdbc drivers, either via hard-coded list of jdbc driver classes to instrument (e.g. DataDog/dd-trace-java#2247 and subsequent follow-up PRs) or via hard-coded list of wrapper classes to exclude from instrumentation (e.g. #4974 (comment)).

Another option is to update the span attributes on the "top-most" jdbc span when we encounter a lower-level jdbc span, but this is not great from a sampling perspective (where we want the span attributes at span start), and has additional performance cost.

Additional context
Not instrumenting wrappers classes will have nice side-effect of improving performance (no need for nested checks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant