New Relic's Java agent includes built-in instrumentation of the most popular parts of the Java ecosystem, including app servers, frameworks, databases, and message queuing systems. For frameworks and libraries that are not instrumented out of the box, you can extend the agent with Java custom instrumentation.
Before you install the Java agent, ensure your system meets these requirements:
The Java agent is compatible with any JVM-based language, including: Java, Scala, Kotlin, and Clojure. For instrumentation support for language-specific features, see the Automatically instrumented frameworks and libraries section below.
Java version
Compatible Java agent versions
Java 7
v3.0.0 to v6.5.0, v6.5.2, v6.5.3, and v6.5.4
Java 8
v3.10.0 to current
Java 11
v4.7.0 to current
Java 17
v7.4.0 to current
Java 21
v8.7.0 to current
Java 23
v8.15.0 to current
Some Java agent versions in this table are no longer supported, but are still listed for reference. The list of supported Java agent versions is in Java agent EOL policy.
If your application uses other application monitoring software besides our agent, we cannot guarantee that our agent will work correctly and we cannot offer technical support. For more information, see Errors while using other monitoring software.
Built-in instrumentation
After you install the Java agent, it automatically instruments many popular frameworks and libraries. With automatic instrumentation, the agent collects rich data out of the box, and data will show up in your New Relic dashboards within minutes of installation. Even if your library is not automatically instrumented, you can still collect data with custom instrumentation and the Java agent API.
The agent automatically instruments these frameworks and libraries:
The agent automatically instruments the following app/web servers. To install the Java agent on supported app/web servers, see Install the Java agent.
ColdFusion 10
Glassfish 3.0 to latest
JBoss 7.0 to latest
JBoss EAP 6.0 to latest
Jetty 9.3.0.M1 to latest
Mule ESB 3.4 to 3.9.x
Netty 3.3.0.Alpha1 to 5.0.0.Alpha1
Resin 3.1.9 to 4.0.x
Spray-can 1.3.1 to latest
Tomcat 7.0.0 to latest
TomEE 1.5 to latest
WebLogic 12.1.2.1 to 14.1.1
WebSphere 8.5.x to 9.x
WebSphere Liberty Profile 8.5 to latest
WildFly 8.0.0.Final to latest
The agent automatically instruments the following frameworks. To install the Java agent on supported frameworks, see Install the Java agent.
Akka 2.2.0-RC1 to latest
Amazon Firehose SDK 2.1.0 to latest
Amazon Kinesis v1 and v2 SDKs
Amazon Lambda SDK 1.11.280 to latest
AmazonS3 client 1.2.13 to latest
AmazonSNS and AmazonSNSAsync clients 1.11.12 to latest
AmazonSQS and AmazonSQSAsync clients 1.3.22 to latest
Exception: Instance-level information is not reported for calls to the getBulk() API method.
The Java agent reports the database name and database server/identifier attributes on slow query traces and transaction traces for these database drivers. To request instance-level information from additional datastores, get support at support.newrelic.com.
You can install the Java agent on a variety of hosting services, including ones not listed below. Here are detailed installation guides for particular hosting services:
The Java agent automatically injects the browser JavaScript agent when you enable auto-instrumentation. After enabling browser injection, you can view browser data in the APM Summary page and quickly switch between the APM and browser data for a particular app. For configuration options and manual instrumentation, see and the Java agent.
When you install the infrastructure and APM agents on the same host, they automatically detect one another. You can then view a list of hosts in the APM UI, and filter your hosts by APM app in our infrastructure UI. For more information, see APM data in the infrastructure UI.