从 Spring 引导应用程序属性调用 Elastic APM 属性

Call Elastic APM Properties From Spring Boot Application Properties

我尝试在 Spring Boot 中实现基于配置文件的应用程序,这显然适用于 Spring Boot。但是当我尝试为 elastic-search APM 实现它时,它不起作用。

根据here:我们可以用elastic.apm前缀描述属性:

elastic.apm.service_name=my-cool-service
elastic.apm.application_packages=org.example,org.another.example
elastic.apm.server_urls=http://localhost:8200

但它不起作用。当我用 elasticapm.properties 调用它时,它起作用了。

你有什么建议吗?

您可以通过 ElasticApmAttacher#attach(map of properties) 尝试此处描述的方法 disscuss-elastic