Skip to content

Commit

Permalink
deps: Upgrade @sentry/electron to v5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taratatach committed Dec 11, 2024
1 parent 93eceb8 commit 436791f
Show file tree
Hide file tree
Showing 3 changed files with 629 additions and 113 deletions.
18 changes: 8 additions & 10 deletions core/utils/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

const url = require('url')

const Sentry = require('@sentry/electron')
const Sentry = require('@sentry/electron/main')
const {
ExtraErrorData: ExtraErrorDataIntegration
} = require('@sentry/integrations')
Expand Down Expand Up @@ -109,9 +109,6 @@ function setup(clientInfos /*: ClientInfo */) {
// ensures that it is the first integrations to be initialized.
integrations: defaultIntegrations => {
return [
// Uploads minidumps via Crashpad/Breakpad built in uploader with
// partial context when reporting native crash.
new Sentry.Integrations.ElectronMinidump(),
// Extract all non-native attributes up to <depth> from Error objects
// and attach them to events as extra data.
// If the error object has a .toJSON() method, it will be run to
Expand All @@ -133,14 +130,15 @@ function setup(clientInfos /*: ClientInfo */) {
// Drop events if a similar message has already been sent if the past
// 24 hours (i.e. avoid spamming our Sentry server).
return alreadySentThisDay ? null : event
},
initialScope: scope => {
scope.setUser({ username: instance })
scope.setTag('domain', domain)
scope.setTag('instance', instance)
scope.setTag('server_name', clientInfos.deviceName)
return scope
}
})
Sentry.configureScope(scope => {
scope.setUser({ username: instance })
scope.setTag('domain', domain)
scope.setTag('instance', instance)
scope.setTag('server_name', clientInfos.deviceName)
})
baseLogger.add(
new SentryTransport({
format: combine(defaultFormatter, json())
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@babel/runtime": "7.16.7",
"@electron/remote": "2.1.2",
"@parcel/watcher": "https://github.com/taratatach/parcel-watcher.git#cozy-desktop",
"@sentry/electron": "3.0.7",
"@sentry/electron": "^5.7.0",
"@sentry/integrations": "^7.114.0",
"agent-base": "7.1.0",
"async": "3.2.3",
Expand Down
Loading

0 comments on commit 436791f

Please sign in to comment.