The Elastic APM Java agent automatically instruments various APIs, frameworks and application servers. This section lists all supported technologies.
If your favorite technology is not supported yet, you can vote for it by participating in our survey. We will use the results to add support for the most requested technologies.
Another option is to add a dependency to the agent’s public API in order to programmatically create custom transactions and spans.
If you want to extend the auto-instrumentation capabilities of the agent, the contributing guide should get you started.
If, for example, the HTTP client library of your choice is not listed, it means that there won’t be spans for those outgoing HTTP requests. If the web framework you are using is not supported, the agent does not capture transactions.
7, 8, 9, 10, 11
7, 8, 9, 10, 11
IBM J9 VM
A transaction will be created for all incoming HTTP requests to your Servlet API-based application. See also Application Servers/Servlet Containers
Spring Web MVC
If you are using Spring MVC (for example with Spring Boot),
the transactions are named based on your controllers (
If you are using JSF, transactions are named based on the requested Facelets and spans are captured for visibility into execution and rendering
Supports embedded Tomcat, Jetty and Undertow
The transactions are named based on your resources (
Note: JAX-RS is only supported when running on a supported Application Server/Servlet Container.
The transactions are named based on your
Note: JAX-WS is only supported when running on a supported Application Server/Servlet Container and when using the HTTP binding.
Application Servers/Servlet Containersedit
The Elastic APM Java agent has generic support for the Servlet API 3+. However, some servers require special handling. The servers listed here are tested by an integration test suite to make sure Elastic APM is compatible with them. Other Servlet 3+ compliant servers will most likely work as well.
7.x, 8.5.x, 9.x
6.4, 7.0, 7.1, 7.2
Jetty (only the
9.2, 9.3, 9.4
The agent automatically creates DB spans for all your JDBC queries. This includes JDBC queries executed by O/R mappers like Hibernate.
Note: Make sure that your JDBC driver is at least compiled for Java 1.5. For example, commons dbcp versions before 1.4 are not supported. IBM DB2 db2jcc drivers are also not supported. Please update to db2jcc4.
The agent automatically creates Elasticsearch spans for queries done through the official REST client.
1.0.0, async queries since 1.5.0
5.x (on by default), 6.x (off by default)
The agent automatically creates Hibernate Search spans for queries done through the Hibernate Search API.
Note: this feature is marked as incubating for version 6.x, which means it is off by default. In order to enable,
The agent creates spans for interactions with the Jedis client.
Distributed tracing will only work if you are using one of the supported networking frameworks.
For the supported HTTP libraries, the agent automatically creates spans for outgoing HTTP requests and propagates tracing headers.
The spans are named after the schema
<method> <host>, for example
1.4.0 (synchronous calls via
JAX-WS clients created via
When a Span is created in a different Thread than its parent, the trace context has to be propagated onto this thread.
This section lists all supported asynchronous frameworks.
The agent propagates the context when using the
When using a messaging framework, sender context is propagated so that receiver events are correlated to the same trace.
The agent captures JMS sends and receives as spans/transactions. In addition, it propagates the context when using
1.7.0 - Incubating (off by default). In order to enable, set the
When using a scheduling framework a transaction for every execution will be created.
The agent instruments any method defined in a package configured in
The agent instruments the
NOTE: only classes from packages configured in
Automatically captures exceptions for
Java method monitoringedit
If you are seeing gaps in the span timeline and want to include certain methods, there are several options:
This is the most flexible way: you can add labels to the span and customize the span type, name, and timestamp.
Wrong usage of the API may lead to invalid traces (scope leaks).
Easier and more robust as there’s nothing you can do wrong like forgetting to end a span or close a scope. It’s also a bit more performant than the programmatic way.
Less flexible on it’s own but can be combined with the API. Just get the current span on an annotated method and customize the span to your liking.
You don’t need to modify the source code.
That makes it possible to monitor code in 3rd party libraries.
You can match methods via wildcards in the package, class or method name,
by their modifier (like
Easy to overuse by matching too many methods which hurts performance. Use together with
The agent sends various system, JVM, and application metrics. See the metrics documentation.
Set the configuration option
- Certain OSGi containers need the following configuration setting in case you see exceptions like
- Other JVM languages, like Scala, Kotlin and Groovy have not been tested yet.
- The agent does currently not support running on JVMs with an enabled
SecurityManager. You may see exceptions like this:
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getProtectionDomain"). Try to grant
java.security.AllPermissionto the agent.