fix: remove bugsnag + update deps

This commit is contained in:
NGPixel
2020-10-03 17:30:56 -04:00
parent fe890979af
commit 63c8a308ba
5 changed files with 696 additions and 825 deletions

View File

@@ -138,11 +138,6 @@ groups:
- 'write:comments'
path: ''
locales: []
telemetry:
BUGSNAG_ID: 'bb4b324d0675bcbba10025617fd2cec8'
BUGSNAG_REMOTE: 'https://notify.bugsnag.com'
GA_ID: 'UA-9094100-7'
GA_REMOTE: 'https://www.google-analytics.com/batch'
reservedPaths:
- login
- logout

View File

@@ -1,6 +1,5 @@
const _ = require('lodash')
const { createApolloFetch } = require('apollo-fetch')
const Bugsnag = require('@bugsnag/js')
const { v4: uuid } = require('uuid')
const os = require('os')
const fs = require('fs-extra')
@@ -10,21 +9,6 @@ const fs = require('fs-extra')
module.exports = {
enabled: false,
init() {
Bugsnag.start({
apiKey: WIKI.data.telemetry.BUGSNAG_ID,
appType: 'server',
appVersion: WIKI.version,
autoDetectErrors: false,
autoTrackSessions: false,
hostname: _.get(WIKI.config, 'telemetry.clientId', uuid()),
enabledReleaseStages: ['production'],
releaseStage: WIKI.IS_DEBUG ? 'development' : 'production',
projectRoot: WIKI.ROOTPATH,
logger: null,
onError: (report) => {
if (!WIKI.telemetry.enabled) { return false }
}
})
WIKI.telemetry = this
if (_.get(WIKI.config, 'telemetry.isEnabled', false) === true && WIKI.config.offline !== true) {
@@ -33,13 +17,13 @@ module.exports = {
}
},
sendError(err) {
Bugsnag.notify(err)
// TODO
},
sendEvent(eventCategory, eventAction, eventLabel) {
// TODO
},
async sendInstanceEvent(eventType) {
if (WIKI.devMode) { return }
if (WIKI.devMode || !this.enabled) { return }
try {
const apollo = createApolloFetch({