mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-24 22:22:50 -05:00
Add (opt-outable) Sentry error tracking telemetry
This commit is contained in:
@@ -4,6 +4,7 @@ import yargs from 'yargs'
|
||||
import TOML from '@iarna/toml'
|
||||
import * as Y from 'yjs'
|
||||
import { Repeater } from '@repeaterjs/repeater'
|
||||
import * as Sentry from '@sentry/electron'
|
||||
import { app, shell, session, BrowserWindow } from 'electron'
|
||||
|
||||
import { ensureValidURL } from '../util'
|
||||
@@ -21,6 +22,9 @@ import TwitchBot from './TwitchBot'
|
||||
import StreamdelayClient from './StreamdelayClient'
|
||||
import initWebServer from './server'
|
||||
|
||||
const SENTRY_DSN =
|
||||
'https://e630a21dcf854d1a9eb2a7a8584cbd0b@o459879.ingest.sentry.io/5459505'
|
||||
|
||||
function parseArgs() {
|
||||
return yargs
|
||||
.config('config', (configPath) => {
|
||||
@@ -186,6 +190,12 @@ function parseArgs() {
|
||||
describe: 'Streamdelay API key',
|
||||
default: null,
|
||||
})
|
||||
.group(['telemetry.sentry'], 'Telemetry')
|
||||
.option('telemetry.sentry', {
|
||||
describe: 'Enable error reporting to Sentry',
|
||||
boolean: true,
|
||||
default: true,
|
||||
})
|
||||
.help().argv
|
||||
}
|
||||
|
||||
@@ -195,6 +205,10 @@ async function main() {
|
||||
return
|
||||
}
|
||||
|
||||
if (argv.telemetry.sentry) {
|
||||
Sentry.init({ dsn: SENTRY_DSN })
|
||||
}
|
||||
|
||||
// Reject all permission requests from web content.
|
||||
session
|
||||
.fromPartition('persist:session')
|
||||
|
||||
Reference in New Issue
Block a user