You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agent configuration can be provided through an elasticapm.properties file in the application classpath, which is required for applications that use Attach API.
There are a few issues:
the feature is not documented, and should be at level 5 (see below), thus after the external elasticapm.properties in filesystem.
Document all the layers (including the implicit ones) of the configuration with their priority:
Remote configuration
elastic.apm.* JVM properties
ELASTIC_APM_* environment variables
external elasticapm.properties in filesystem (if any)
elasticapm.properties file in application classpath
Agent default configuration
Make agent configuration loading implement this ordering, which will be a breaking change for people who rely on current behavior where elasticapm.properties in classpath is always applied with highest priority which prevents overriding it remotely.
The text was updated successfully, but these errors were encountered:
Actually, after reading the code a bit, the ordering of
external elasticapm.properties in filesystem (if any)
is wrong, as the location to the file can be overridden through JVM properties and environment variables, which means that in practice due to this dependency, it's just below remote configuration in this list.
Actually, after reading the code a bit, the ordering
Moreover, it makes sense to promote the external elasticapm.properties file anyway, as it is also a way of making config options dynamic, which means its contents need to take precedence over non-dynamic ones.
After checking with @felixbarny Tuesday, I mistakenly thought the order of non-remote options was in reverse. The external elasticapm.properties file is applied after java system properties and os environment variables.
Issue description
Agent configuration can be provided through an
elasticapm.properties
file in the application classpath, which is required for applications that use Attach API.There are a few issues:
elasticapm.properties
in filesystem.Proposal
Document all the layers (including the implicit ones) of the configuration with their priority:
elastic.apm.*
JVM propertiesELASTIC_APM_*
environment variableselasticapm.properties
in filesystem (if any)elasticapm.properties
file in application classpathMake agent configuration loading implement this ordering, which will be a breaking change for people who rely on current behavior where
elasticapm.properties
in classpath is always applied with highest priority which prevents overriding it remotely.The text was updated successfully, but these errors were encountered: