You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Events (event, exception, message) and Transactions are processed by the MainEventProcessor, which sets the default environment if the environment is null on both the Event and SentryOptions then the default is used.
So, I'm thinking of moving options.getEnvironment() != null ? options.getEnvironment() : DEFAULT_ENVIRONMENT from the MainEventProcessor to the getEnvironment() method of the SentryOptions. That should fix the problem and not introduce any duplication. @romtsn WDYT?
@lbloder sounds reasonable, but this way we'd always set production even if users want to intentionally set environment to null (don't know if that could be ever useful though). At least on Cocoa we've just set the default environment to production in SentryOptions, so that should do probably? getsentry/sentry-cocoa#2447
Description
Similar to getsentry/sentry-cocoa#2411
If the environment is not set for the SDK errors will default to production. However, sessions are sent without an environment.
Expected outcome: sessions would be sent with an environment
Actual outcome: sessions are sent without an environment set
Steps To Reproduce
The text was updated successfully, but these errors were encountered: