Enabling or disabling transaction tracking and diagnostic data collection

By default, transaction tracking and method tracing are enabled for the data collector. Heap snapshot collection and memory allocation collection are disabled. You can customize the data collection or the intervals at which the diagnostic data is collected by editing the .properties files of the data collector.

About this task

The properties files of the data collector are in the dc_home directory, for example, /opt/ibm/apm/.gdc/7.3.0.14.08. Use different properties to customize the data collector for the following purposes:
  • Enable or disable transaction tracking.
  • Enable or disable heap snapshot collection.
  • Specify the interval at which the data collector takes snapshot of heap dump.
  • Enable or disable memory allocation monitoring.
  • Specify the interval at which the data collector collects memory allocation information.
  • Enable or disable method tracing.
Remember: Depending on whether you have restarted the Liberty server after data collector configuration, different .properties files are applicable. If you have restarted the Liberty server after data collector configuration, a runtime directory is created within the dc_home directory. After that, you can only use the .properties files within the dc_home/runtime/appserver_version.node_name.profile_name.server_name directory to customize data collector for each application server.

Procedure

  • To enable or disable transaction tracking, set the com.ibm.tivoli.itcam.dc.bluemix.transaction.enabled property in the following file to true or false:

    dc_home/runtime/appserver_version.node_name.server_name/ldc.properties (if the runtime directory does not exist, use dc_home/ldc/etc/ldc.properties)

    After transaction tracking is enabled, you can monitor IBM Java application stack in the topologies.
  • To enable or disable heap snapshot collection, set the com.ibm.tivoli.itcam.hc.send.heap.enable and com.ibm.tivoli.itcam.hc.snapshot.automatic.enable properties in the following file to true or false.

    dc_home/runtime/appserver_version.node_name.server_name/hc.properties (if the runtime directory does not exist, use dc_home/healthcenter/etc/hc.properties)

    After heap snapshot collection is enabled, the data collector can take heap snapshot at specified intervals. Heap dump information can be displayed in the Heap Dump dashboard.
  • To change the interval at which heap snapshot is taken by the data collector, set the com.ibm.tivoli.itcam.hc.snapshot.automatic.interval property in the same file to a positive integer. The unit of the interval is minute and the default is 360.

    dc_home/runtime/appserver_version.node_name.server_name/hc.properties (if the runtime directory does not exist, use dc_home/healthcenter/etc/hc.properties)

  • To enable or disable memory allocation collection, set the com.ibm.tivoli.itcam.hc.events.collection.automatic.enable property in the following file to true or false.

    dc_home/runtime/appserver_version.node_name.server_name/hc.properties (if the runtime directory does not exist, use dc_home/healthcenter/etc/hc.properties)

    Remember: To enable memory allocation collection, you also need to ensure the following two lines are added to the jvm.options file of the Liberty server.
    -Xhealthcenter:level=inprocess
    -Xgc:allocationSamplingGranularity=10000
    After memory allocation collection is enabled, data is available in the Memory Analysis dashboard.
  • To specify the interval at which memory allocation information is collected, set the com.ibm.tivoli.itcam.hc.events.collection.automatic.interval property in the same file to a positive integer. The unit of the interval is minute and the default is 15.

    dc_home/runtime/appserver_version.node_name.server_name/hc.properties (if the runtime directory does not exist, use dc_home/healthcenter/etc/hc.properties)

  • To enable or disable method tracing, set the dfe.enable.methoddata property in the following file to true or false:

    dc_home/runtime/appserver_version.node_name.profile_name.server_name/custom/gdc/gdc_custom.properties (if the runtime directory does not exist, use dc_home/gdc/etc/gdc_dfe.properties)

Results

After you modify the .properties files, restart the Liberty server for the change to take effect.

For more information about the data collector .properties files for each application server, see Properties files for Liberty data collector.

What to do next

  • After method tracing is enabled, you can set thresholds for different types of requests, so that different levels of monitoring data can be collected for different requests. For instructions, see Customizing the request thresholds.
  • If you disabled memory allocation collection, remember to remove the following lines from the jvm.options file of the Liberty server:
    -Xhealthcenter:level=inprocess
    -Xgc:allocationSamplingGranularity=10000