getsentry / sentry-native

Sentry SDK for C, C++ and native applications.
MIT License
404 stars 170 forks source link

Wrong documentation for 'dsn' option in Native SDK #1056

Closed VolodymyrKorniichuk-GeoComply closed 1 month ago

VolodymyrKorniichuk-GeoComply commented 1 month ago

SDK

Native SDK (Windows, macOS)

Description

On the page https://docs.sentry.io/platforms/native/configuration/options/ documentation says:

dsn The DSN tells the SDK where to send the events. If this value is not provided, the SDK will try to read it from the SENTRY_DSN environment variable. If that variable also does not exist, the SDK will just not send any events.

This was true in some older versions of SDK (for example, when I used Native SDK 0.6.2). Now, I switched 0.7.9 and in case I don't set DSN (in debug builds, for example), sentry_init returns error 1. So, the description "If that variable also does not exist, the SDK will just not send any events" is not complete. SDK will also return 1 from sentry_init and not start crash handler at all.

Suggested Solution

No response

getsantry[bot] commented 1 month ago

Assigning to @getsentry/support for routing ⏲️

supervacuus commented 1 month ago

This unintended regression was introduced while adding the HTTP proxy support to the crashpad_handler in 0.6.3. I am no longer sure why it was necessary or if it was required at all. But this should be fixed in the code, not in the docs. Thanks for letting us know!