You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
By default, classes in java.*, com.sun.* and sun.* are excluded from being instrumented.
There is a hard-coded list of classes that are allowed for instrumentation, for example in ElasticApmAgent#getAgentBuilder(...) :
*URLConnection for jdk http client instrumentation
all classes in java.util.concurrent
Thus, for all plugins that instrument those classes, we need to modify this hard-coded list to allow class instrumentation. Failure to do so results in classes being ignored and lots of time spent debugging plugin and trying to figure out why.
Describe the solution you'd like
For the classes in those packages, each plugin should provide a list of classes that should not be filtered out for instrumentation.
There might be multiple ways to implement this:
using an explicit list with fully qualified names (strict, but definitely doable for classes in JDK)
reusing bytebuddy matchers with an expression that will enable those classes for instrumentation (allows to avoid using fully-qualified names).
reusing existing class matcher and dynamically adding exclusion to the existing white-listing: transparent from plugins, but any plugin matcher should not be too broad.
The text was updated successfully, but these errors were encountered:
In 6abbf01 (part of #1230) I've removed the default java.*, com.sun.*, and sun.* from the default excludes. I've just added them specifically to the trace_methods instrumentation.
Is your feature request related to a problem? Please describe.
By default, classes in
java.*
,com.sun.*
andsun.*
are excluded from being instrumented.There is a hard-coded list of classes that are allowed for instrumentation, for example in
ElasticApmAgent#getAgentBuilder(...)
:*URLConnection
for jdk http client instrumentationjava.util.concurrent
Thus, for all plugins that instrument those classes, we need to modify this hard-coded list to allow class instrumentation. Failure to do so results in classes being ignored and lots of time spent debugging plugin and trying to figure out why.
Describe the solution you'd like
For the classes in those packages, each plugin should provide a list of classes that should not be filtered out for instrumentation.
There might be multiple ways to implement this:
The text was updated successfully, but these errors were encountered: