Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SENTRY_DSN environment variable not picked up automatically anymore #1295

Closed
brunoballekens opened this issue Feb 26, 2021 · 3 comments · Fixed by #1296
Closed

SENTRY_DSN environment variable not picked up automatically anymore #1295

brunoballekens opened this issue Feb 26, 2021 · 3 comments · Fixed by #1296
Assignees
Labels
Type: Bug Something isn't working

Comments

@brunoballekens
Copy link

Platform:

  • [ x ] Logback -> 1.2.3

The version of the SDK: 4.2.0

We set our DSN in the environment variable SENTRY_DSN

Our sentry appender was configured as

<appender name="Sentry" class="io.sentry.logback.SentryAppender">
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>ERROR</level>
        </filter>
</appender>

with sentry logback integration 4.1.0 this worked fine.

now (with #1271) errors are not sent anymore.

@brunoballekens
Copy link
Author

The documentation says (https://docs.sentry.io/platforms/java/guides/logback/#dsn-configuration) :

If the DSN is not present in the logback.xml configuration, Sentry will attempt to read it from the system property sentry.dsn, environment variable SENTRY_DSN or the dsn property in sentry.properties file. See the configuration page for more details on external configuration.

so I was expecting it to work

@francisdb
Copy link

workaround

    <appender name="Sentry" class="io.sentry.logback.SentryAppender">
        <options>
            <dsn>${SENTRY_DSN}</dsn>
        </options>
    </appender>

@marandaneto
Copy link
Contributor

looks like a regression, will look into it, thanks cc @maciejwalkowiak

@marandaneto marandaneto added the Type: Bug Something isn't working label Feb 26, 2021
maciejwalkowiak added a commit that referenced this issue Feb 26, 2021
… config (#1296)

* Fix: Start Logback appender when DSN is not set in XML config

Fixes #1295

* changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants