-
Notifications
You must be signed in to change notification settings - Fork 277
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
Address various JDBC instrumentation issues #2561
Conversation
ebea00f
to
deb7546
Compare
@@ -1,6 +1,7 @@ | |||
muzzle { | |||
pass { | |||
coreJdk() | |||
extraDependency 'com.ibm.db2:jcc:11.1.4.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this allows to muzzle the instrumentation now that DB2 is matched separately from the rest for startup performance reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -84,15 +88,18 @@ public AgentSpan onConnection( | |||
*/ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's not relevant to this PR, but why is there an extra {
indentation here?
...ent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java
Outdated
Show resolved
Hide resolved
...ent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java
Outdated
Show resolved
Hide resolved
ee572c0
to
0b64703
Compare
I think it's actually possible to do this another way without needing to trust unwrapping or to know anything but the connection names, which would simplify both statement and prepared statement instrumentations, which would just be to inject the |
0b64703
to
3aea0a6
Compare
@bantonsson I have dropped the statement instrumentation changes and the recursive connection unwrapping because I want to solve this problem a different way later. |
3aea0a6
to
ba65718
Compare
This PR makes a few changes to the JDBC instrumentation
Connection
andPreparedStatement
instrumentations, which have expensive type matchers. This means that unless DB2 is being used, JDBC matching is about as cheap as it can get.CallableStatement
implementation, which was missed in Add support for redshift JDBC #2511