Skip to content

Commit 2be978f

Browse files
committed
Remove spammy events from sentrygp
1 parent 0f24249 commit 2be978f

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
25-
"@sentry/browser": "^5.6.1",
25+
"@sentry/browser": "^5.6.2",
2626
"@tippy.js/react": "^2.1.1",
2727
"babel-plugin-preval": "^3.0.1",
2828
"codesandbox-api": "^0.0.22",

packages/common/src/utils/analytics.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ export async function initializeSentry(dsn: string) {
3838
* new.codesandbox.io or new.csb.app
3939
*/
4040
blacklistUrls: [/.*\.codesandbox\.io/, /.*\.csb\.app/],
41+
beforeSend: event => {
42+
if (
43+
event.stacktrace.frames[0] &&
44+
event.stacktrace.frames[0].filename.endsWith(
45+
'codesandbox.editor.main.js'
46+
)
47+
) {
48+
// This is the spammy event that doesn't do anything: https://sentry.io/organizations/codesandbox/issues/1054971728/?project=155188&query=is%3Aunresolved
49+
// Don't do anything with it right now, I can't seem to reproduce it for some reason.
50+
// We need to add sourcemaps
51+
return undefined;
52+
}
53+
54+
return event;
55+
},
4156
});
4257
}
4358

yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,12 +1918,12 @@
19181918
conventional-changelog "0.0.17"
19191919
github-url-from-git "^1.4.0"
19201920

1921-
"@sentry/browser@^5.6.1":
1922-
version "5.6.1"
1923-
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.6.1.tgz#9bb64d2b8371c70e3725b3f6a95835f3ca6ff8ee"
1924-
integrity sha512-EtuI3YUIXfSzbF2Z7c5UXcdkcjZj83Y0vj73kMXBxxYsmDkyU+KtJFFvonSUrLILMqYBNZXTgCrfglLfFkl7kA==
1921+
"@sentry/browser@^5.6.2":
1922+
version "5.6.2"
1923+
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.6.2.tgz#f39e95c3aff2d4b4fd5d0d4aa7192af73f20d24e"
1924+
integrity sha512-Nm/W/5ra6+OQCWQkdd86vHjcYUjHCVqCzQyPasd6HE7SNlWe5euGVfFfDuUFsiDrMAG5uKfGYw5u/AqoweiQkQ==
19251925
dependencies:
1926-
"@sentry/core" "5.6.1"
1926+
"@sentry/core" "5.6.2"
19271927
"@sentry/types" "5.6.1"
19281928
"@sentry/utils" "5.6.1"
19291929
tslib "^1.9.3"
@@ -1940,10 +1940,10 @@
19401940
progress "2.0.0"
19411941
proxy-from-env "^1.0.0"
19421942

1943-
"@sentry/[email protected].1":
1944-
version "5.6.1"
1945-
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.6.1.tgz#946f064cc500bf4cd2a1bac580192fe440b614c7"
1946-
integrity sha512-gK8XfkJIZLsBEQehkr2q2fdHI50B3yo4RXiixSZiNBVIzQ+1z3JcMssDzGwhbY81NHUzHZ7of3oQ4Ab4OGRI/g==
1943+
"@sentry/[email protected].2":
1944+
version "5.6.2"
1945+
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.6.2.tgz#8c5477654a83ebe41a72e86a79215deb5025e418"
1946+
integrity sha512-grbjvNmyxP5WSPR6UobN2q+Nss7Hvz+BClBT8QTr7VTEG5q89TwNddn6Ej3bGkaUVbct/GpVlI3XflWYDsnU6Q==
19471947
dependencies:
19481948
"@sentry/hub" "5.6.1"
19491949
"@sentry/minimal" "5.6.1"

0 commit comments

Comments
 (0)