SpringBoot应用程序中的Sentry日志记录配置



我有一个Spring Boot应用程序:

Spring Boot 2.3.2.RELEASE
sentry-spring 1.7.30
sentry-logging 1.7.30

我想在应用程序中设置dsn。yml:

sentry:
dsn: ${DSN}

但它不起作用。只有当我创建具有相同属性(硬编码(的sentry.properties时,它才有效。我的问题是yml配置出了什么问题?

我可能认为您已经用""编写了DSN。如果您想在application.yml中使用它,请在没有""的情况下使用它。

sentry:
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0"   //wrong
sentry:
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0"   //ok

最新更新