Record APM Spans as JFR Events

APM Agent and APM Tracer support recording APM spans as JFR Events.

Currently JDK 11 or higher are supported.

This section is applicable to the APM Agent and covers the following:

For information about recording APM spans as JFR events when using the APM Tracer, see Record APM Spans as JFR Events under Configure APM Java Tracer.

Note

Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. For information about Java Flight Recorder (JFR) and Java Mission Control (JMC), see JDK Mission Control.

Capture APM Events in JFR Recordings

To capture APM events in JFR recordings when using the APM Agent, follow these steps:

  1. Ensure APM Agent is working properly.

    Open Trace Explorer and confirm you are able to view all the traces. For information about opening and using Trace Explorer, see Monitor Traces in Trace Explorer.

  2. Review the APM Agent properties file.

    The AgentConfig.properties file is the APM Agent properties file located under oracle-apm-agent/config/<version> directory.

    The com.oracle.apm.agent.tracer.enable.jfr property enables or disables the addition of APM events in JFR recordings that are made available.

    The default value for the com.oracle.apm.agent.tracer.enable.jfr property is TRUE which indicates that APM events are already enabled in JFR recordings.

    To disable APM events in JFR recordings, set the com.oracle.apm.agent.tracer.enable.jfr property to FALSE.

  3. Initiate a recording.

    To test that everything is working properly, you need to initiate a recording using your preferred method (It could be using JDK Mission Control UI or JCMD comand line utility).

    To verify that APM trace events are properly added to JFR recordings, connect to JDK Mission Control and confirm the APM traces are visible under Event Browser: Click on APM OpenTracing and confirm that APM trace events are visible.