How do I disable Sentry for only development environment?
Apparently if you call
String dns = null; Sentry.init(dns);
Then that should do it, but for me it is not working. Reports are still coming through. I still have the dns defined in sentry.properties file where it is usually loaded. Is that a problem?
Also my logback-spring.xml file has Sentry defined as follows:
<appender name="SENTRY" class="io.sentry.logback.SentryAppender"> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> </filter> </appender> <root level="INFO"> <appender-ref ref="ALL" /> <appender-ref ref="ERROR" /> <appender-ref ref="SENTRY" /> </root>
I would really like to also disable events for info level, but I am not sure how to do that either. Any help would be appreciated!