src/main/resources/elasticapm.properties
server_url=${PROJECT_ELASTICAPM_URL}
Environment variables within elasticapm.properties are not resolved in runtime, when server url is passed as an ENV parameter to the service launched by docker. The following error is thrown instead
ch.client.WIRE : [7f640f1e] Received raw response: 200 OK
2021-04-05 12:51:42,242 [elastic-apm-configuration-reloader] WARN co.elastic.apm.agent.shaded.stagemonitor.configuration.ConfigurationOption - Error in Attachment configuration: no protocol: ${PROJECT_ELASTICAPM_URL} Default value 'http://localhost:8200' for 'server_url' will be applied.