Skip to content

Commit

Permalink
deps: Upgrade @sentry/electron to v5.7.0 (#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
taratatach authored Dec 16, 2024
2 parents 1f5582b + 0af657e commit a81525b
Show file tree
Hide file tree
Showing 3 changed files with 720 additions and 224 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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"@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/integrations": "7.5.1",
"@sentry/electron": "^5.7.0",
"@sentry/integrations": "^7.114.0",
"agent-base": "7.1.0",
"async": "3.2.3",
"auto-bind": "4.0.0",
Expand Down Expand Up @@ -137,7 +137,7 @@
"@babel/core": "7.16.7",
"@babel/eslint-parser": "^7.25.9",
"@electron/notarize": "^2.1.0",
"@sentry/cli": "^2.3.0",
"@sentry/cli": "^2.39.1",
"babel-preset-cozy-app": "^2.0.1",
"chai": "4.3.4",
"chai-like": "1.1.1",
Expand Down
Loading

0 comments on commit a81525b

Please sign in to comment.