-
Notifications
You must be signed in to change notification settings - Fork 327
JDBC instrumentation #84
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #84 +/- ##
============================================
- Coverage 74.87% 74.55% -0.32%
- Complexity 779 793 +14
============================================
Files 87 90 +3
Lines 2901 2975 +74
Branches 278 283 +5
============================================
+ Hits 2172 2218 +46
- Misses 594 615 +21
- Partials 135 142 +7
Continue to review full report at Codecov.
|
closes elastic#35 Signed-off-by: Felix Barnsteiner <felix.barnsteiner@elastic.co>
| @Override | ||
| public ElementMatcher<? super TypeDescription> getTypeMatcher() { | ||
| return not(isInterface()) | ||
| .and(nameContains("Statement")) |
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.
Just out of curiosity, why was this needed? Is this a performance optimization to avoid the isSubTypeOf check?
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.
See the comment in https://github.com/elastic/apm-agent-java/blob/master/apm-agent-plugins/apm-servlet-plugin/src/main/java/co/elastic/apm/servlet/ServletInstrumentation.java#L69
Basically it’s because the isSubType marcher can be pretty expensive. It causes a lot of type descriptions to be parsed by ByteBuddy. I stagemonitor, I cached TypeDescriptions to improve instrumentation performance (startup times). A user experienced an OOME because of an isSubType matcher. But I should re evaluate with a recent Byte Buddy version.
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.
What is your experience in regards to the performance of the isSubType(Class) and hasSuperType(named(String)) matchers?
Signed-off-by: Felix Barnsteiner <felix.barnsteiner@elastic.co>
a1f8ece to
f711c8c
Compare
|
TODO: more integration tests |
closes #35