[CHORE] Bugsnag logging setup#1096
[CHORE] Bugsnag logging setup#1096IlarionHalushka wants to merge 27 commits intoRocketChat:developfrom
Conversation
.circleci/config.yml
Outdated
| name: Upload sourcemaps to Bugsnag | ||
| command: | | ||
| react-native bundle --platform android --dev false --entry-file index.js --bundle-output android-release.bundle --sourcemap-output android-release.bundle.map | ||
| curl https://upload.bugsnag.com/react-native-source-map -F apiKey=72a0364cb361fc8f0fdc6cbf605f9963 -F appVersionCode=$CIRCLE_BUILD_NUM -F dev=false -F platform=android -F [email protected] -F [email protected] -F projectRoot=app.bugsnag.com/rocketchat-1 |
There was a problem hiding this comment.
We need to change this API Key
.circleci/config.yml
Outdated
| name: Upload sourcemaps to Bugsnag | ||
| command: | | ||
| react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios-release.bundle --sourcemap-output ios-release.bundle.map | ||
| curl https://upload.bugsnag.com/react-native-source-map -F apiKey=72a0364cb361fc8f0fdc6cbf605f9963 -F appBundleVersion=$CIRCLE_BUILD_NUM -F dev=false -F platform=ios -F [email protected] -F [email protected] -F projectRoot=app.bugsnag.com/rocketchat-1 |
There was a problem hiding this comment.
We need to change this API key
| <data android:mimeType="*/*" /> | ||
| </intent-filter> | ||
| </activity> | ||
| <meta-data |
index.js
Outdated
| import { Client } from 'bugsnag-react-native'; | ||
| import { name as appName, share as shareName } from './app.json'; | ||
|
|
||
| const bugsnag = new Client('72a0364cb361fc8f0fdc6cbf605f9963'); |
There was a problem hiding this comment.
API Key.
Is it ok to use it here or should we hide from Github?
There was a problem hiding this comment.
sensitive info of users can't be accessed using API key so I think it should stay
There was a problem hiding this comment.
I would move this to some separate config file just to not keep API Keys within source code. Also you should consider if you want to get bug reports from apps that are forks of this app especially when they won't share the sources.
# Conflicts: # .circleci/config.yml # android/build.gradle # app/views/SettingsView/index.js # ios/Podfile # ios/RocketChatRN.xcodeproj/project.pbxproj # package.json # yarn.lock
config.js
Outdated
| @@ -0,0 +1,3 @@ | |||
| export default { | |||
| BUGSNAG_API_KEY: '72a0364cb361fc8f0fdc6cbf605f9963' | |||
There was a problem hiding this comment.
Can you add a task on CI to replace this key and other places?
What will happen if we commit with BUGSNAG_API_KEY: ''?
Will it compile?
I'm thinking in DX here.
We shouldn't enforce anyone to have a Bugsnag profile in order to compile our app, but it would be better if we left that empty and replace on build time.
There was a problem hiding this comment.
I cannot test it because my bugsnag account trial has expired :(
When I change BUGSNAG_API_KEY to '' then build doesn't fail but I'm not sure if whether it still sends requests to bugsnag.
|
Closed due to new opened PR: #1145 |


@RocketChat/ReactNative
Closes #123
This PR aims to add error logging using Bugsnag.
Bugsnag provides ability to upload source maps for each build in order to be able to see an informative stack trace.
Send crash reportsswitch which enables\disables reports\analytics sending.Screenshots of error stack trace on Bugsnag:

Uploaded source maps (release via CI, debug from local machine):
