-
-
Notifications
You must be signed in to change notification settings - Fork 465
Description
Integration
sentry-spring-boot-jakarta
Java Version
21
Version
8.16.0
Steps to Reproduce
- Spring Boot 3.5.3
- no logback.xml
- sentry.dsn in applicaiton.yml
Dependencies on classpath:
- sentry
- sentry-logback
- sentry-reactor
- sentry-spring-boot-jakarta
- sentry-spring-boot-starter-jakarta
- sentry-spring-jakarta
Expected Result
No warnings about sentry failing to init
Actual Result
There is a warning logged:
12:17:28,447 |-WARN in io.sentry.logback.SentryAppender[SENTRY_APPENDER] - Failed to init Sentry during appender initialization: DSN is required. Use empty string or set enabled to false in SentryOptions to disable SDK.
Even tho it works.
Adding a breakpoint in Sentry.init() reveals, that is been called twice, once from SentryAutoConfiguration and again from SentryAppender#start via SentryLogbackInitializer. The problem on that second call is, that the SentryAppender creates an empty SentryOptions instance that is used in start(). If the SentryLogbackInitializer would pass its instance of SentryProperties to the Appender on creation, the warning does not appear.
Potential fixes (from my understanding of what happens :D):
Metadata
Metadata
Assignees
Labels
Projects
Status