Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sentry #53

Merged
merged 2 commits into from
Nov 18, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Add sentry
  • Loading branch information
amaury1093 committed Nov 18, 2018
commit 831d3789a6c141261f10f2ed7da7b880ad8e4c85
10 changes: 9 additions & 1 deletion App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// SPDX-License-Identifier: GPL-3.0

import React, { PureComponent } from 'react';
import { Font } from 'expo';
import { Constants, Font } from 'expo';
import { Provider } from 'mobx-react';
import Sentry from 'sentry-expo';

import { RootStore } from './stores';
import { Background as LoadingBackground } from './Screens/Loading/Background';
Expand All @@ -12,6 +13,13 @@ import { Screens } from './Screens';
// Set up global MST stores
const stores = RootStore.create({ api: undefined, error: false, location: {} });

// Remove this once Sentry is correctly setup.
Sentry.enableInExpoDevelopment = true;

if (Constants.manifest.extra.sentryPublicDsn) {
Sentry.config(Constants.manifest.extra.sentryPublicDsn).install();
}

export class App extends PureComponent {
state = {
fontLoaded: false
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Before developing the app, you need to fetch your own API tokens for the followi
| Algolia Places | https://community.algolia.com/places/rest.html (`Get Started` button on the bottom) | Optional, lower API rates if not provided. |
| Google Maps for iOS | https://developers.google.com/maps/documentation/ios-sdk/start | Optional in development. |
| Google Maps for Android | https://developers.google.com/maps/documentation/android-api/ | Optional in development. |
| Sentry Bug Tracking | https://sentry.io | Optional. |

Then run the following commands:

Expand Down
17 changes: 16 additions & 1 deletion app.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"expo": {
"android": {
"config": {
"googleMaps": { "apiKey": "YOUR_KEY" }
"googleMaps": {
"apiKey": "YOUR_KEY"
}
},
"icon": "assets/logos/android/playstore-icon.png",
"package": "com.shitismoke.app",
Expand All @@ -15,9 +17,22 @@
"algoliaApplicationId": "YOUR_KEY",
"githubUrl": "https://github.com/amaurymartiny/shoot-i-smoke",
"locationIqKey": "YOUR_KEY",
"sentryPublicDsn": "YOUR_KEY",
"waqiToken": "YOUR_KEY"
},
"githubUrl": "https://github.com/amaurymartiny/shoot-i-smoke",
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "YOUR_SENTRY_ORG",
"project": "YOUR_SENTRY_PROJECT",
"authToken": "YOUR_KEY"
}
}
]
},
"icon": "assets/logos/ios/[email protected]",
"ios": {
"buildNumber": "1.2.0",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-navigation": "^2.13.0",
"sentry-expo": "^1.10.0",
"truncate": "^2.0.1"
},
"devDependencies": {
Expand Down