Disable Sentry for development environment

How do I disable Sentry for only development environment?

Apparently if you call

String dns = null;

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">

  <root level="INFO">
    <appender-ref ref="ALL" />
    <appender-ref ref="ERROR" />
    <appender-ref ref="SENTRY" />

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!

1 Like

Hey, could you solve this situation? Iā€™m on the same right now, but on iOS.