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:
Tip
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.
In order to continue to innovate and efficiently provide new capabilities to our customers, we'll occasionally need to drop support for older JVM versions. When that happens, you can continue using a version of the agent that supports your older JVM version, but new features and fixes won't be included in those older agent versions. We recommend upgrading to a currently supported JVM version to take advantage of the latest agent releases. Please see the table of compatible agent versions to determine which JVM versions are compatible.
Java version
Compatible agent versions
Java 5
Agent v1.3.0 to v2.21.7
Java 6
Agent v3.0.0 to v4.3.0
Java 7
Agent v3.0.0 to v6.5.0
Java 8
Agent v3.10.0 to current
Java 9
Agent v3.43.0 to current
Java 10
Agent v4.4.0 to current
Java 11
Agent v4.7.0 to current
Java 12
Agent v4.12.0 to current
Java 13
Agent v5.7.0 to current
Java 14
Agent v5.11.0 to current
Java 15
Agent v6.1.0 to current
Java 16
Agent v7.3.0 to current
Compatible:
IBM JVM versions 8 for Linux
Eclipse OpenJ9 versions 8 to 13 for Linux, Windows, and macOS
OpenJDK and AdoptOpenJDK JVM versions 8 to 16 for Linux, Windows, and macOS
Oracle Hotspot JVM versions 8 to 16 for Linux, Solaris, Windows, and macOS
Azul Zing JVM versions 8 and 11 for Linux, Windows, and macOS
Azul Zulu JVM versions 8 to 12 for Linux, Windows, and macOS
Amazon Corretto JVM versions 8 and 11 for Linux, Windows, and macOS
Alibaba Dragonwell JVM versions 8 and 11 for Linux, Windows, and macOS
(Java 1.7) Compatible only with Java agent 6.5.x [ZIP | 15.4 MB] legacy agent:
OpenJDK and AdoptOpenJDK JVM versions 7
IBM JVM version 7
Oracle Hotspot JVM version 7 for Linux, Solaris, Windows, macOS
(Java 1.6) Compatible only with Java agent 4.3.x [ZIP | 9.9 MB] legacy agent:
Apple Hotspot JVM version 6 for macOS
IBM JVM version 6
Oracle Hotspot JVM version 6.0 for Linux, Solaris, Windows, macOS
(Java 1.5) Compatible only with Java agent 2.21.x [ZIP | 2.8 MB] legacy agent:
Oracle Hotspot JVM version 5.0 for Linux, Solaris, Windows, macOS (Java SE 5.0)
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.
Mongo 2.12.0 to latest (synchronous clients only)/li>
Spymemcached 2.11.0 to 2.12.x
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 Browser monitoring 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 Infrastructure hosts by APM app in the Infrastructure UI. For more information, see APM data in Infrastructure.