When the agent is in Constructor Mode, transaction activity is tracked from thread to thread by instrumenting the constructors of Runnable objects, and their run methods, such that the agent can link the creation point of the object with their actual execution. Since in many cases the work executed by Runnable objects does not relate to the Business Transaction context within which they were created, the agent provides for exclude rules to limit which threads are tracked. A default set of these is maintained within the agent configuration, and this can be fine-tuned by the user where necessary.
Constructor Mode Configuration
Classes for multithreaded correlation are configured in the <excludes>
child elements of the <fork-config>
element in the <agent_home>/conf/app-agent-config.xml
file.
The default configuration excludes the Java, Org, WebLogic and WebSphere classes:
<fork-config>
<!-- exclude java and org -->
<excludes filter-type="STARTSWITH" filter-value="com.singularity/"/>
<excludes filter-type="STARTSWITH" filter-value="java/,javax/,com.sun/,sun/,org/"/>
<!-- exclude weblogic and websphere -->
<excludes filter-type="STARTSWITH" filter-value="com.bea/,com.weblogic/,weblogic/,com.ibm/,net/sf/,com/mchange/""/>
. . .
XML
The agent supports package names where the levels in the hierarchy are either separated by dots (.) or slashes (/). The agent converts the dots to slashes internally.
Custom Configuration
You can edit the app-agent-config.xml
file to exclude additional classes from thread correlation. All classes not excluded are by default included.
Use the <excludes>
element to specify a comma-separated list of classes or packages to be excluded. Use the singular form, <excludes>
, to specify a single class or a package.
For includes, you must specify each package or class individually using the <include>
element. You can include a sub-package or subclass of an excluded element by specifying the sub-package or subclass with an <include>
element. If a classname is matched by both an exclude and include pattern, the more specific pattern matched prevails. That is, an include match with org.example.myclass
prevails over an exclude match for org.example
.
Configuration Using Node Properties
You can also configure which classes or packages to include or exclude using a node property. See, thread-correlation-classes and thread-correlation-classes-exclude
Disable Thread Correlation at the Agent
To disable thread correlation (which disables end-to-end asynchronous transaction monitoring as well) at the agent, use one of the following:
Set the Java agent node property thread-correlation-classes-exclude to disable asynchronous monitoring for all the relevant classes.
thread-correlation-classes-exclude=a,b,c,d,e,f,...z
Add the following line under the fork-config section of the app-agent-config.xml
file.
<exclude filter-type=
"REGEX"
filter-value=
".*"
/>