Skip to content

Enabling Sentry for your Local Builds

Chelsea Troy edited this page Aug 10, 2020 · 3 revisions

Sentry is the service that we use to get error reporting for the mobile app. It is already mostly set up for you via the repo, but if you want your local builds to generate reported errors, you need to generate an authentication token for yourself and put that into 2 places in the app.

Here is what to do:

  1. Go to this URL: https://sentry.io/settings/account/api/auth-tokens/
  2. Click "Create New Token." This will show you a popover with some options for permissions, and several of them are already checked. You can go with the defaults here.
  3. Click "Create Token" on the popover.
  4. Copy your auth token and paste it in your ios/sentry.properties and android/sentry.properties as the value for the auth.token variable so that those two files look like this:

android sentry properties file

and

ios sentry properties file

*Don't worry: this key was invalidated after these pictures were taken 😂

Remember: Once you have added your personal auth token to these two files, you do not want git to track those changes on your machine or push them to our mobile repo. To get git to ignore further changes to those files, navigate to the mobile repo on your command line and use the following commands:

$git update-index --assume-unchanged android/sentry.properties

$git update-index --assume-unchanged ios/sentry.properties