I was recently debugging why warnings weren’t showing up in Sentry and narrowed it down to our upgrade from sentry-logback
from 1.7.30
to 3.1.0
.
As far as I can tell, even though our configuration did not change, this upgrade stopped creating Sentry events from the instances of log.warn
in our codebase. We upgraded, didn’t notice this, and continued to upgrade up to 3.2.0
. I’ve since pulled everything back to 1.7.30
and it works again.
What do I need to change about our configuration to fix warnings for the new versions of the library?
I’ve read the release notes and current docs, but I don’t see any obvious migration steps. Here is what our logback configuration currently looks like:
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<appender name="SENTRY" class="io.sentry.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="SENTRY"/>
</root>
</configuration>
If you want to view further details about our setup I actually blogged about, https://dev.to/focusedlabs/sentry-with-spring-boot-the-better-way-9kl.
As you can see the Sentry appended should be getting WARNs and above, but these messages never hit Sentry post 3.x.x. How do I fix this?
If this looks like an issue with the Sentry library vs a misconfiguration on my side I am happy to move this topic over to a Github issue.