---
title: Java agent JFR real-time profiling settings
source: https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-jfr-settings
---

JFR settings configure Java Flight Recorder-based real-time profiling for continuous JVM performance monitoring.

> #### 💡 TIP
>
> Back to the full settings index: [Java agent configuration](https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file)

## JFR (Real-time profiling)

The Java agent uses Java Flight Recorder (JFR) to collect high fidelity JVM data for [Real-time profiling](https://docs.newrelic.com/docs/agents/java-agent/features/real-time-profiling-java-using-jfr-metrics/).

Configure real-time profiling in the `jfr` section in the agent YAML. These configuration options can be overridden with [system properties](https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file#System_Properties) prefixed by `newrelic.config.jfr.` or with [environment variables](https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file#Environment_Variables) prefixed with `NEW_RELIC_JFR_`.

**enabled**

| Type    | Boolean |
| ------- | ------- |
| Default | `false` |

Set to `true` to enable [Real-time profiling with JFR](https://docs.newrelic.com/docs/agents/java-agent/features/real-time-profiling-java-using-jfr-metrics/). This setting will apply dynamically and does not require a JVM restart.

> #### ⚠️ IMPORTANT
>
> Real-time profiling with JFR is on by default in Java agent [version 7.1.0](https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes). If you are on any other agent version 7.0.0 or higher, you can turn on JFR by changing the value to `true`.

**audit_logging**

| Type    | Boolean |
| ------- | ------- |
| Default | `false` |

Set to `true` to enable audit logging which will display all JFR metrics and events in each harvest batch. Audit logging is extremely verbose and should only be used for troubleshooting purposes.

> #### ⚠️ IMPORTANT
>
> This applies to Java agent [version `7.0.0` or higher](https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes).

**harvest_interval**

| Type    | Integer |
| ------- | ------- |
| Default | `10`    |

The time interval, in seconds, of how often JFR data is sent to New Relic. The default is 10 seconds.

> #### ⚠️ IMPORTANT
>
> This applies to Java agent [version 8.17.0 or higher](https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes).

**queue_size**

| Type    | Integer  |
| ------- | -------- |
| Default | `250000` |

The maximum number of JFR events stored in the agent's memory queue. Increasing this value can help prevent gaps in JFR data, but it will also increase the agent's resource consumption. If the queue is too large, data may be dropped if backend pipeline limits are exceeded. For more information, refer to [event API ingest limits](https://docs.newrelic.com/docs/data-apis/ingest-apis/event-api/introduction-event-api/#limits).

> #### ⚠️ IMPORTANT
>
> This applies to Java agent [version 8.17.0 or higher](https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes).

**use_display_name**

| Type    | Boolean |
| ------- | ------- |
| Default | `false` |

When set to `true`, the agent uses the display name for JFR metric reporting instead of the default app name.

> #### ⚠️ IMPORTANT
>
> This applies to Java agent [version 8.17.0 or higher](https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes).
