• Log inStart now

Real-time profiling for Java using JFR metrics

With New Relic's real-time profiling for Java 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 quickly see how an application’s deployment affects the overall health of the cluster.

Find performance bottlenecks

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 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.

JFR daemon

The JFR daemon is an exporter for JFR events which allows you to harness the power of the New Relic platform for visualizing your JVM's behavior. Using the New Relic Java telemetry SDK as the underlying implementation, the JFR daemon converts JFR events into New Relic telemetry types and reports them to New Relic's metric and event ingest APIs.

There are three different usage scenarios for the JFR daemon:

Supported Java versions

While the JFR daemon supports any version of Java 11 and above, we don't recommend using any non-LTS version of Java in production environments.

Some vendors have backported JFR to their Java 8 binaries. For instance, OpenJDK backported JFR on version 8u262. The JFR daemon is compatible with those Java versions.

Requirements and Usage Instructions

Requirements and instructions vary for each usage scenario. For full details please see the links for your specific usage scenario:


Apps running with the JFR daemon should expect the JFR subsystem to use additional memory.

View your data

To view your data, go to one.newrelic.com > Explorer > (select service) > More Views > Realtime Profiling Java.

Understand JVM cluster behavior over time

The JVM cluster timeline view shows the 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.

one.newrelic.com > Explorer > (select service) > Realtime Profiling Java: The JVM cluster timeline view shows the JVM behavior across the cluster.

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.

Select How is JVM health determined? for a detailed breakdown of how JVM health is calculated.

JVM details

To find the JVM details page, go to: one.newrelic.com > Explorer > (select service) > Realtime Profiling Java > (select JVM).

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

Identify resource-intensive code paths with flame graphs


The flame graph feature is only compatible with the New Relic Java agent JFR service usage scenario.

A "flame graph" is a way of visualizing the call tree. Each block in the graph represents a function. The more CPU time and memory resources a method consumes, the wider that block is.

Use flame graphs to identify the Java classes and methods that are most frequently executed in your application code. By using flame graphs to optimize the hot spots in your code, you can reduce resource consumption and increase your application’s overall performance.

Here are some details about the flame graph colors:

  • Light color: methods from a Java SE package.
  • Dark color: methods from other libraries.

one.newrelic.com > Explorer > (select service) > Realtime Profiling Java > (select JVM): You can see details for each JVM, including flame graphs.

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.