Skip to content

Latest commit

 

History

History
396 lines (343 loc) · 16.3 KB

compatibility-requirements-java-agent.mdx

File metadata and controls

396 lines (343 loc) · 16.3 KB
title tags translate metaDescription redirects freshnessValidatedDate
Compatibility and requirements for the Java agent
Agents
Java agent
Getting started
jp
The New Relic APM Java agent: compatibility and requirements.
/docs/agents/java-agent/getting-started/compatibility-requirements-java-agent
/docs/compatibility-requirements-java-agent
/docs/agents/java-agent/frameworks/java-instance-level-database-information
/docs/agents/java-agent/installation/java-se-50-support
/docs/java/java-se-5
never

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.

Want to try out New Relic's Java agent? Create a New Relic account for free! No credit card required.

Requirements to install the agent [#java-requirements]

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](#auto-instrumented) section below.
<table>
  <thead>
    <tr>
      <th style={{ width: "200px" }}>
        Java version
      </th>

      <th style={{ width: "300px" }}>
        Compatible Java agent versions
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        Java 7
      </td>

      <td>
        v3.0.0 to v6.5.0, v6.5.2, v6.5.3, and v6.5.4
      </td>
    </tr>

    <tr>
      <td>
        Java 8
      </td>

      <td>
        v3.10.0 to current
      </td>
    </tr>

    <tr>
      <td>
        Java 11
      </td>

      <td>
        v4.7.0 to current
      </td>
    </tr>

    <tr>
      <td>
        Java 17
      </td>

      <td>
        v7.4.0 to current
      </td>
    </tr>

    <tr>
      <td>
        Java 21
      </td>

      <td>
        v8.7.0 to current
      </td>
    </tr>
  </tbody>
</table>

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](/docs/apm/agents/java-agent/getting-started/java-agent-eol-policy/).

<Collapser id="security-requirements" title="Security requirements"

As a standard [security measure for data collection](/docs/accounts-partnerships/accounts/security/data-security), your app server must support SHA-2 (256-bit). SHA-1 is not supported.

<Collapser id="other-apm" title="Use of other monitoring software"

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](/docs/apm/new-relic-apm/troubleshooting/errors-while-using-new-relic-apm-alongside-other-apm-software).

Built-in instrumentation [#auto-instrumented]

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](/docs/agents/java-agent/installation/java-agent-manual-installation).
* 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 12.2.x
* WebSphere 8.5.x to 9.x
* WebSphere Liberty Profile 8.5 to latest
* WildFly 8.0.0.Final to latest

<Collapser id="frameworks" title="Frameworks and libraries"

The agent automatically instruments the following frameworks. To install the Java agent on supported frameworks, see [Install the Java agent](/docs/agents/java-agent/installation/java-agent-manual-installation).

* Akka 2.2.0-RC1 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
* Cats Effect v2
  * Scala 2.12: 2.1 to latest
  * Scala 2.13: 2.1 to latest
* Cats Effect v3
  * Scala 2.12: 3.2.x
  * Scala 2.13: 3.2.x
* CXF 2.1.3 to latest
* Grails 1.3.7 to 2.3.x
* GraphQL 16.0 - 16.2
* GraphQL 17.0 to 20.x
* GraphQL 21.0 to latest
* Hibernate 3.3.0.CR1 to 6.0.0.Alpha2
* Hystrix 1.3.15 to latest
* Jakarta RESTful WS API 2.1.x to 3.1.x
* JAX-RS 1.0 to 2.0
* JBoss Logging 1.3.0.Final to latest (for our [logs in context](/docs/logs/logs-context/java-configure-logs-context-all/) feature)
* [JCache API](/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3200) 1.0.0 to latest
* Jersey 1.0.1 to latest
* JSF (Java Server Faces)
* JUL (Java util logging) (for our [logs in context](/docs/logs/logs-context/java-configure-logs-context-all/) feature)
* Log4j1 1.2.17 to latest (for our [logs in context](/docs/logs/logs-context/java-configure-logs-context-all/) feature)
* Log4j2 2.6 to latest (for our [logs in context](/docs/logs/logs-context/java-configure-logs-context-all/) feature)
* Logback 1.1 to latest (for our [logs in context](/docs/logs/logs-context/java-configure-logs-context-all/) feature)
* Monix Tasks
  * Scala 2.11: 3.0.0 to 3.2.x
  * Scala 2.12: 3.0.0 to latest
  * Scala 2.13: 3.0.0 to latest
  * Scala 3: 3.0.0 to latest
* Play Server 2.3.0 to latest
* Quartz Job Scheduler 1.8.3 to 2.2.x
* RESTEasy 2.2-RC-1 to latest
* S3Client 2.1.0 to latest
* SnsClient 2.1.0 to latest
* Spray 1.3.1 to latest
* Spring 3.0.0.RELEASE to latest
* Spring Batch 4.0.0 to latest
* Spring Web Services from 1.5.7 to latest
* Spring Webflux 5.0.0.RELEASE to latest
* SqsClient 2.1.0 to latest
* Struts 2.0 to latest
* Thrift 0.8.0 to latest
* Vert.x 3.2.0 to 4.5.x
* ZIO
  * Scala 2.13: 1.0.9 to latest

<Collapser id="http-messaging" title="HTTP and messaging"

The agent automatically instruments the following HTTP clients and messaging services. For instructions, see [Install the Java agent](/docs/agents/java-agent/installation/java-agent-manual-installation).

* Akka HTTP 2.4.5 to latest
* Akka Http Core from 0.4 to latest
* AsyncHttpClient 2.0.0-RC1 to latest
* gRPC 1.4.0 to latest
* HTTP4s Blaze client
  * Scala 2.12: 0.21 - 0.23.0-M1
  * Scala 2.13: 0.21 - 0.23.0-M1
* HTTP4s Blaze server
  * Scala 2.12: 0.21 - 0.22.0-M8
  * Scala 2.13: 0.21 - 0.22.0-M8
* HttpAsyncClient 4.1 to latest
* Apache Httpclient from 3.1 to 5.x
* java.net.HttpURLConnection
* JMS from 1.1 to latest
* [Kafka Clients](/docs/agents/java-agent/instrumentation/java-agent-instrument-kafka-message-queues) 0.10.0.0 to latest (for metric and event data)
* [Kafka Clients](/docs/agents/java-agent/instrumentation/java-agent-instrument-kafka-message-queues) 0.11.0.0 to latest (for distributed tracing and event data)
* [Kafka Connect](/docs/agents/java-agent/instrumentation/java-agent-instrument-kafka-message-queues) 1.0.0 to latest (for metrics)
* [Kafka Connect](/docs/agents/java-agent/instrumentation/java-agent-instrument-kafka-message-queues) 2.0.0 to latest (for distributed tracing and transaction data)
* [Kafka Streams](/docs/agents/java-agent/instrumentation/java-agent-instrument-kafka-message-queues) 1.0.0 to latest (for metrics)
* [Kafka Streams](/docs/agents/java-agent/instrumentation/java-agent-instrument-kafka-message-queues) 2.0.0 to latest (for distributed tracing and transaction data)
* OkHttp 3.6.0 to latest
* Ning AsyncHttpClient 1.x
* Play WS
  * Scala 2.11: 2.6.0 to latest
  * Scala 2.12: 2.6.0 to latest
  * Scala 2.13: 2.7.3 to latest
* RabbitMQ 1.7.2 to latest (AMQP and JMS)
* Spray-client 1.3.1 to latest
* Spring JMS 1.1 to latest
* Spring webclient from 5.0.0.release to latest
* STTP v2
  * Scala 2.12: 2.2.3 to latest 2.x
  * Scala 2.13: 2.2.3 to latest 2.x, 3.0.0 to latest 3.x

<Collapser id="JDBC" title="Datastores"

New Relic currently supports MySQL and PostgreSQL to capture explain plans for slow database queries.

* Amazon v1 DynamoDB 1.11.106 to latest
* Amazon v2 DynamoDB 2.1.0 to latest
* Anorm from 2.0 to 2.5
* DataStax Cassandra 3.0.0 to latest (If you use [high security](/docs/accounts-partnerships/accounts/security/high-security), see the [configuration documentation for allow lists](/docs/agents/java-agent/configuration/java-agent-configuration-config-file#tt-slow_query_whitelist).)
* DB2 9.1 to latest
* Derby 10.11.1.1 to latest
* Generic JDBC (any JDBC compliant driver)
* H2 1.0.57 to latest
* HSQL 1.7.2.2 to latest
* INet Oracle Driver (Oranxo) 3.06, 3.14
* INet MERLIA 7.0.3, 8.04.03, and 8.06
* Jedis Redis driver 1.4.0 to 2.10.x, 3.0.0 to 4.x
* jTDS 1.2 to latest
* Lettuce Redis driver 4.3 to latest
* MariaDB 1.1.7 or higher
* Microsoft SQL Server 1.2 to latest
* MongoDB
  * Synchronous clients: 3.1.0-rc0 to latest
  * Asynchronous clients: 3.4.0 to 4.1.x
  * Reactive streams clients: 4.2.0 to latest
* MySQL mysql-connector-java 3.0.8 to latest
* Oracle ojdbc5, ojdbc6, ojdbc7, ojdbc8, ojdbc10, ojdbc14
* Postgres 8.0-312.jdbc3 to latest
* R2DBC H2 0.8.x to 0.9.x
* R2DBC MariaDB 1.0.2 to 1.1.1
* R2DBC MySQL 0.8.x to latest
* R2DBC MSSQL 0.8.0 to latest
* R2DBC Oracle 0.x to latest
* R2DBC Postgres 0.9.x to latest
* Slick 3.0.0 to 3.3.x
* Solr 4.0 to latest
* Spymemcached 2.11 to latest
* Sybase (jConnect) JDBC 3 driver 6.0 to latest

<Collapser id="instance-level-db" title="Instance-level database information"

New Relic collects [instance details for a variety of databases and database drivers](/docs/apm/applications-menu/features/analyze-database-instance-level-performance-issues). The ability to view specific instances and the types of database information in APM depends on your New Relic agent version.

New Relic's Java agent [versions 3.33.0 or higher](/docs/release-notes/agent-release-notes/java-release-notes/java-agent-3330) support the following:

* Any [compatible JDBC driver](#JDBC)
* Amazon DynamoDB 1.11.106 or higher
* Amazon v2 DynamoDB 2.1.0 to latest
* DataStax Cassandra driver 3.0.0 to latest
* Jedis Redis driver 1.4 to 2.10.x, 3.0.0 to 4.x
* MongoDB
  * Synchronous clients: 3.1.0-rc0 to latest
  * Asynchronous/Reactive streams clients: 3.4.0 thru 4.1.2
* Spymemcached 2.11.0 to latest

  <DoNotTranslate>**Exception:**</DoNotTranslate> 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](https://support.newrelic.com).

<Collapser id="hosting-services" title="Hosting services"

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:

* [Google App Engine (GAE) flexible environment](/docs/agents/java-agent/additional-installation/google-app-engine-flexible-installation-java#tomcat-example)
* [Heroku](/docs/agents/java-agent/heroku/java-agent-heroku)

<Collapser id="async" title="Asynchronous instrumentation"

For supported frameworks, the Java agent [usually instruments async work automatically](/docs/agents/java-agent/async-instrumentation/asynchronous-applications-monitoring-considerations). However, you can use the Java agent API to [extend this instrumentation](/docs/agents/java-agent/async-instrumentation/java-agent-api-asynchronous-applications).

<Collapser id="other" title="Other instrumented features"

* EJB Session Beans 3.0 or higher
* JMX
* JSP (Java Server Pages) 2.0 to 3.0
* [Scala](/docs/agents/java-agent/frameworks/scala-installation-java) 2.9.3 to latest

Connect the agent to other New Relic products [#digital-intelligence-platform]

The Java agent integrates with other New Relic products to give you end-to-end visibility:

  <th>
    Integration
  </th>
</tr>
  <td>
    The Java agent automatically injects the browser JavaScript agent when you [enable auto-instrumentation](/docs/browser/new-relic-browser/installation/install-new-relic-browser-agent#select-apm-app). After enabling browser injection, you can view browser data in the [APM Summary page](/docs/apm/applications-menu/monitoring/apm-overview-page) and quickly switch between the APM and browser data for a particular app. For configuration options and manual instrumentation, see [<InlinePopover type="browser" /> and the Java agent](/docs/agents/java-agent/instrumentation/page-load-timing-java).
  </td>
</tr>

<tr>
  <td>
    [Infrastructure monitoring](/docs/infrastructure/new-relic-infrastructure/getting-started/introduction-new-relic-infrastructure)
  </td>

  <td>
    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](/docs/infrastructure/new-relic-infrastructure/data-instrumentation/new-relic-apm-data-infrastructure).
  </td>
</tr>

<tr>
  <td>
    [New Relic dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-new-relic-one-dashboards)
  </td>

  <td>
    The Java agent sends default events and attributes to dashboards, or you can [run NRQL queries in the query builder](/docs/query-your-data/explore-query-data/query-builder/use-advanced-nrql-mode-specify-data). You can also [record custom events](/docs/insights/insights-data-sources/custom-data/insert-custom-events-new-relic-apm-agents) for advanced analysis.
  </td>
</tr>

<tr>
  <td>
    [Synthetic monitoring](/docs/synthetics/new-relic-synthetics/getting-started/introduction-new-relic-synthetics)
  </td>

  <td>
    [Synthetic transaction traces](/docs/synthetics/new-relic-synthetics/using-monitors/collect-synthetic-transaction-traces) connect requests from synthetic monitors to the underlying APM transaction.
  </td>
</tr>
Product
[Browser monitoring](/docs/browser/new-relic-browser/getting-started/introduction-new-relic-browser)