Excluding classes from being monitored

You can customize data collection by excluding certain classes from being monitored. Use the toolkit properties file for this customization.

About this task

Edit the toolkit_custom.properties file to customize transaction tracking for each application server or edit the toolkit_global_custom.properties file for all the application server instances.

The toolkit_custom.properties file is used in the following procedure for a single application server. The properties are also supported in the toolkit_global_custom.properties file. For more information about the toolkit properties files, see Property files for Liberty data collector.

Procedure

  1. Open the toolkit_custom.properties file of the application server with a text editor. This file can be found in the following directory:

    dc_home/runtime/app_server_version.node_name.profile_name.server_name/custom

  2. Edit the file to add the following property and save your changes.
    am.camtoolkit.gpe.customxml.exclude=excludes.xml
  3. In the same custom directory, create the excludes.xml file with the following content and specify the class name to be excluded within the <exclude> tag. You can add as many classes as needed and the asterisk wildcard (*) is supported.
    <gpe>
      <bci>
        <classExcludes>
          <exclude>class_name_to_be_exclued</exclude>
          <exclude>class_name_to_be_exclued</exclude>
        </classExcludes>
      </bci>
    </gpe>
    Example:
    <gpe>
      <bci>
        <classExcludes>
          <exclude>org.apache.struts.action.ActionServlet</exclude>
          <exclude>com.company.package.*</exclude>
        </classExcludes>
      </bci>
    </gpe>
  4. Restart the application server.

What to do next

To verify that the class are excluded, look in the toolkit.xml file and the class name should be listed in the <classExcludes> section.
Remember: The toolkit.xml file contains runtime settings and it is refreshed every time the application server is restarted.