With New Relic's real-time Java profiling using Java Flight Recorder (JFR) metrics, you can run continuous, always-on profiling of your Java code in production environments. The accompanying JVM cluster timeline view provides a fast and intuitive way to diagnose cluster-wide performance problems. For example, you can now quickly see how an application’s deployment affects the overall health of the cluster.
Why this matters
Troubleshooting performance bottlenecks in your Java application or service can help you better understand the following:
- Where you’re wasting resources
- When an incident occurs
- What happened during an incident
- What performance issues led up to an incident
To make such troubleshooting faster and easier, you need to see the high fidelity runtime characteristics of your code running on the JVM and you need that data in real time.
Want to learn more about how you might use this feature? Read our JFR blog post.
- This feature is currently in limited release and is available only by request. To request, contact your New Relic account representative or submit a comment on the Explorers Hub .
- This feature is available only in New Relic One. For details, see Find data.
- Java 14 or higher.
- New Relic Java agent version 5.11.0 or higher running on your JVM.
- JFR must be enabled at JVM startup in the Java agent config.
- JFR extension is present in the extensions directory.
- An Insert API key.
To report JFR data using the Java agent, follow these steps:
Register an Insert API key.
Add the following configuration to the
insert_api_key: YOUR_INSERT_API_KEY # Key generated in step 1 jfr: enabled: true # This enables the collection of JFR metric data audit_mode: false # Logs data sent and the response from that request
- Go to the New Relic One App Catalog and click Add this app next to Real-time Java profiling.
Once the application has been added, you will be able to access the Java Flight Recorder from any Java application in New Relic One.
This feature is available in New Relic One. To find your data, go to one.newrelic.com > Entity explorer > (select service) > Java Flight Recorder.
Understand JVM cluster behavior over time
The JVM cluster timeline view shows you JVM behavior across your entire cluster. This timeline enables quicker troubleshooting and issue detection; for example, at a glance you can see:
- How a recent deployment affected the rest of the JVM cluster
- When a JVM restarted
- How an individual instance was affected by its noisy neighbor
To make troubleshooting easier, you need to see the high fidelity runtime characteristics of your code running on the JVM and you need that data in real time.
Each row of the timeline represents a specific JVM over time. Inside each row, a box represents a 5-minute period of that JVM’s life. From least severe to most severe, yellow, orange, and red traffic lights indicate anomalous behavior for a JVM, so you can drill down into that instance and the right time period when investigating errors or other performance issues.
The details panel for each JVM provides several critical views:
- How resources are allocated within a process
- How garbage collection affects performance
- How to track garbage collection with logs
- How CPU is used