Introductionedit

Welcome to the APM Java Agent documentation.

Elastic APM automatically measures the performance of your application and tracks errors. For example, it records spans for database queries and transactions for incoming HTTP requests. See Supported technologiesedit to learn about which frameworks and technologies the Elastic APM Java agent supports out-of-the-box.

Spans are grouped in transactions - by default one for each incoming HTTP request. But it’s possible to create custom transactions not associated with an HTTP request.

By default the agent comes with support for common frameworks out-of-the-box. To instrument other events, you can use custom spans. For information about custom spans, see the public api documentation.

Note

The minimum required version of the APM Server is 6.5.0

Additional componentsedit

APM Agents work in conjunction with the APM Server, Elasticsearch, and Kibana. Please view the APM Overview for details on how these components work together.

Get startededit

Set upedit

There are three different ways to set up the Elastic APM Java Agent:

  1. Manual setup with --javaagent flag - Manually set up and configure the agent with the --javaagent JVM flag.
  2. Automatic setup with apm-agent-attach.jar - Automatically set up the agent without needing to alter the configuration of your application server.
  3. Programmatic API setup to self-attach - Use the apm-agent-attach artifact and the attach API to set up the agent.

Configurationedit

Once you’ve setup the agent, see the configuration guide on how to configure Elastic APM.

Supported technologiesedit

Please check the supported technologies page whether the Elastic APM agent supports auto-instrumentation of the technologies your application is using.