Skip to content

Best practice for using different DSNs for different stages #437

@sroze

Description

@sroze

As far as I know, this is how the configuration of the Sentry client needs to happen on a ReactNative application:

  1. DSN (and others) need to be in the ios/sentry.properties and android/sentry.properties files
  2. The DSN needs to be accessible within the JavaScript in order to call Sentry.config(DSN).install(). We are using react-native-config, which is populating the DSN variable from either a .env file (or from the plist file for instance).

The thing is: we'd love to be able to identify that some errors are coming from the "staging" or others from the "production" application. What's the best way to handle this?

Note that I'm happy that this might be a non-issue if we believe that the application builds should "simply" be promoted from staging to production without any rebuild. Even though it makes little sense as we definitely need different API URLs, etc...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions