The Elastic APM agent can be configured through different configuration sources, with the following descending order of precedence:

No prefix is required for the configuration keys unless stated otherwise.

  1. Central configuration
    Supports Dynamic configuration
  2. file
    In same folder as agent jar or provided through config_file ( [1.8.0] Added in 1.8.0. ) option.
    Supports Dynamic configuration
  3. Java system properties
    All configuration keys are prefixed with elastic.apm.
    Supports Dynamic configuration when set from the application.
  4. Environment variables
    All configuration keys are in uppercase and prefixed with ELASTIC_APM_
  5. runtime attach parameters, those are mutually exclusive

    1. --config parameter (Automatic setup with apm-agent-attach-standalone.jar)
    2. arguments of ElasticApmAttacher.attach(...) (Programmatic API setup to self-attach)
    3. in classpath root with ElasticApmAttacher.attach() (Programmatic API setup to self-attach)
  6. default values

Dynamic configurationedit

Configuration options marked with Dynamic true can be changed at runtime when set from sources that support it:

  • Central configuration
  • file
  • Java system properties when set from within the application.

There are two distinct ways to use as an external configuration file, and as a classpath resource
Only the external file can be used for dynamic configuration.

Minimal configurationedit

In order to get started with Elastic APM, the most important configuration options are service_name, server_urls and application_packages. So a minimal version of a configuration might look like this:

System properties.



Environment variables.


Option referenceedit

This is a list of all configuration options grouped by their category. Click on a key to get more information.