getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.16k stars 435 forks source link

Failed to bind properties under 'sentry.parsed-dsn' to io.sentry.Dsn #3825

Open detomarco opened 6 days ago

detomarco commented 6 days ago

Integration

sentry

Java Version

22

Version

7.16.0

Steps to Reproduce

Use version 7.16 and set SENTRY_DSN="" (empty string)

Expected Result

Application starts and sentry is disabled

Actual Result

from Sentry v7.16.0 I get this error

Failed to bind properties under 'sentry.parsed-dsn' to io.sentry.Dsn:

    Reason: java.lang.IllegalArgumentException: Invalid DSN scheme: null

Action:

Update your application's configuration

I think it's related to this PR https://github.com/getsentry/sentry-java/pull/3796

markushi commented 3 days ago

Thanks for opening this issue @detomarco ! Are you sure this worked before? I just tried our spring boot demo app 7.15.0 and compared it with 7.16.0 - both fail if the DSN is an invalid string containing only ticks """" .

However setting SENTRY_DSN= instead of SENTRY_DSN="" works as expected, and disables sentry.

Could share a few more details about your environment / sentry setup?

evmetatron commented 3 days ago

I have the same problem. When I use 7.16.0, I get the same error.

Hovever when I use 7.15.0, I don't get any error.

I use springboot v3.3 and there's application.yaml with param sentry.dsn: ''

adinauer commented 2 days ago

I've done some testing and so far I'm unable to reproduce the exact problem (Invalid DSN scheme: null).

Can you please share more details like integrations used, config settings etc.?