sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Debug builds: Different `environment` and opt-out for event capture in Editor config

Open bruno-garcia opened this issue 3 years ago • 1 comments
trafficstars

Users are using Debug.isDebugBuild to conditionally initialize the SDK and to change the environment.

The SDK should, by default, report environment=debug when Debug.isDebugBuild is true. Sentry editor window should have a checkbox to opt-out from capturing events in Debug builds.

bruno-garcia avatar Feb 25 '22 16:02 bruno-garcia

Customers also mentioned it's not possible today to set the environment at build time in a way that affects not only the C# events and also the native events. Docs also lack any indication on how to deal with this.

SENTRY_ENVIRONMENT should be picked up at build time and affect not only the C# layer but the native too. Docs should mention that. This was mainly built for runtime (when init the SDK checks). So it's important to point out in Unity this is a build-time thing too

bruno-garcia avatar Apr 21 '22 14:04 bruno-garcia