【问题标题】:Sentry logging configuration in SpringBoot applicationSpring Boot 应用程序中的哨兵日志记录配置
【发布时间】:2020-12-01 12:25:25
【问题描述】:

我有一个 Spring Boot 应用程序:

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

我想在 application.yml 中设置 dsn:

sentry:
   dsn: ${DSN}

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

【问题讨论】:

    标签: spring-boot sentry


    【解决方案1】:

    我可能认为您使用"" 编写了DSN。如果您想在application.yml 中使用它,请不要使用""

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

    【讨论】:

    • 感谢您的回答 Hesa​​m,但我看不出错误解决方案和正常解决方案之间有什么区别。
    • 如果您有新问题,请点击 按钮提出问题。如果有助于提供上下文,请包含指向此问题的链接。 - From Review
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-25
    • 2020-12-03
    • 1970-01-01
    • 2018-01-05
    • 1970-01-01
    • 2021-06-27
    相关资源
    最近更新 更多