src/main/resources/elasticapm.properties
server_url=${PROJECT_ELASTICAPM_URL}
当服务器 url 作为 ENV 参数传递给 docker 启动的服务时,elasticapm.properties 中的环境变量不会在运行时解析。而是抛出以下错误
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.