Skip to content

Commit 4d8fa45

Browse files
authored
Move sentry to a new, clean project (codesandbox#3410)
1 parent 90c1f09 commit 4d8fa45

File tree

5 files changed

+57
-40
lines changed

5 files changed

+57
-40
lines changed

packages/app/scripts/sentry-create-release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const COMMIT_HASH = childProcess
1010
console.log('Marking this release in Sentry');
1111
try {
1212
childProcess.execSync(
13-
`yarn sentry-cli releases --org=codesandbox -p frontend new "${VERSION}"`
13+
`yarn sentry-cli releases --org=codesandbox -p client new "${VERSION}"`
1414
);
1515
childProcess.execSync(
1616
`yarn sentry-cli releases --org=codesandbox set-commits "${VERSION}" --commit "codesandbox/codesandbox-client@${COMMIT_HASH}"`

packages/app/src/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ if (process.env.NODE_ENV === 'production') {
7171

7272
try {
7373
initializeSentry(
74-
'https://3943f94c73b44cf5bb2302a72d52e7b8@sentry.io/155188'
74+
'https://f595bc90ce3646c4a9d76a8d3b84b403@sentry.io/2071895'
7575
);
7676

7777
overmind.eventHub.on('action:start', event => {

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@babel/polyfill": "^7.4.4",
4848
"@codesandbox/notifications": "^1.0.6",
4949
"@codesandbox/template-icons": "^1.1.0",
50-
"@sentry/browser": "^5.9.0",
50+
"@sentry/browser": "^5.11.2",
5151
"@styled-system/css": "^5.0.23",
5252
"@tippy.js/react": "^3.1.1",
5353
"babel-plugin-preval": "^3.0.1",

packages/common/src/utils/analytics/sentry.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,26 @@ function getSentry(): Promise<typeof import('@sentry/browser')> {
99
return import(/* webpackChunkName: 'sentry' */ '@sentry/browser');
1010
}
1111

12+
let latestVersionPromise: Promise<string>;
13+
function getLatestVersion() {
14+
if (!latestVersionPromise) {
15+
latestVersionPromise = fetch('/version.txt')
16+
.then(x => x.text())
17+
.catch(x => '');
18+
}
19+
20+
return latestVersionPromise;
21+
}
22+
1223
export async function initialize(dsn: string) {
1324
if (!DO_NOT_TRACK_ENABLED) {
1425
_Sentry = await getSentry();
26+
const latestVersion = await getLatestVersion();
27+
28+
if (VERSION !== latestVersion) {
29+
// If we're not running the latest version we don't want to see the errors appear
30+
return Promise.resolve();
31+
}
1532

1633
return _Sentry.init({
1734
dsn,

yarn.lock

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,14 +3252,14 @@
32523252
conventional-changelog "0.0.17"
32533253
github-url-from-git "^1.4.0"
32543254

3255-
"@sentry/browser@^5.9.0":
3256-
version "5.9.0"
3257-
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.9.0.tgz#09f6f544fce51d52f2e086ef776509b15ef04761"
3258-
integrity sha512-KTpmAau98QyJZtoV7LVYEFd1cdKQGk5yHlRyP3pCkhDcRbgicBNR3umdRDpsI5Ozgix3zNlyQprz0iQPmrPNRQ==
3259-
dependencies:
3260-
"@sentry/core" "5.8.0"
3261-
"@sentry/types" "5.7.1"
3262-
"@sentry/utils" "5.8.0"
3255+
"@sentry/browser@^5.11.2":
3256+
version "5.11.2"
3257+
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.11.2.tgz#f0b19bd97e9f09a20e9f93a9835339ed9ab1f5a4"
3258+
integrity sha512-ls6ARX5m+23ld8OsuoPnR+kehjR5ketYWRcDYlmJDX2VOq5K4EzprujAo8waDB0o5a92yLXQ0ZSoK/zzAV2VoA==
3259+
dependencies:
3260+
"@sentry/core" "5.11.2"
3261+
"@sentry/types" "5.11.0"
3262+
"@sentry/utils" "5.11.1"
32633263
tslib "^1.9.3"
32643264

32653265
"@sentry/cli@^1.44.4", "@sentry/cli@^1.47.1":
@@ -3274,46 +3274,46 @@
32743274
progress "2.0.0"
32753275
proxy-from-env "^1.0.0"
32763276

3277-
"@sentry/core@5.8.0":
3278-
version "5.8.0"
3279-
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.8.0.tgz#bbfd2f4711491951a8e3a0e8fa8b172fdf7bff6f"
3280-
integrity sha512-aAh2KLidIXJVGrxmHSVq2eVKbu7tZiYn5ylW6yzJXFetS5z4MA+JYaSBaG2inVYDEEqqMIkb17TyWxxziUDieg==
3277+
"@sentry/core@5.11.2":
3278+
version "5.11.2"
3279+
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.11.2.tgz#f2d9d37940d291dbcb9a9e4a012f76919474bdf6"
3280+
integrity sha512-IFCXGy7ebqIq/Kb8RVryCo/SjwhPcrfBmOjkicr4+DxN1UybLre2N3p9bejQMPIteOfDVHlySLYeipjTf+mxZw==
32813281
dependencies:
3282-
"@sentry/hub" "5.8.0"
3283-
"@sentry/minimal" "5.8.0"
3284-
"@sentry/types" "5.7.1"
3285-
"@sentry/utils" "5.8.0"
3282+
"@sentry/hub" "5.11.2"
3283+
"@sentry/minimal" "5.11.2"
3284+
"@sentry/types" "5.11.0"
3285+
"@sentry/utils" "5.11.1"
32863286
tslib "^1.9.3"
32873287

3288-
"@sentry/hub@5.8.0":
3289-
version "5.8.0"
3290-
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.8.0.tgz#56aaeb7324cb66d90db838011cb0127f5558007f"
3291-
integrity sha512-VdApn1ZCNwH1wwQwoO6pu53PM/qgHG+DQege0hbByluImpLBhAj9w50nXnF/8KzV4UoMIVbzCb6jXzMRmqqp9A==
3288+
"@sentry/hub@5.11.2":
3289+
version "5.11.2"
3290+
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.11.2.tgz#a3b7ec27cd4cea2cddd75c372fbf1b4bc04c6aae"
3291+
integrity sha512-5BiDin6ZPsaiTm29rCC41MAjP1vOaKniqfjtXHVPm7FeOBA2bpHm95ncjLkshKGJTPfPZHXTpX/1IZsHrfGVEA==
32923292
dependencies:
3293-
"@sentry/types" "5.7.1"
3294-
"@sentry/utils" "5.8.0"
3293+
"@sentry/types" "5.11.0"
3294+
"@sentry/utils" "5.11.1"
32953295
tslib "^1.9.3"
32963296

3297-
"@sentry/minimal@5.8.0":
3298-
version "5.8.0"
3299-
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.8.0.tgz#b7ad5113504ab67f1ef2b0f465b7ba608e6b8dc5"
3300-
integrity sha512-MIlFOgd+JvAUrBBmq7vr9ovRH1HvckhnwzHdoUPpKRBN+rQgTyZy1o6+kA2fASCbrRqFCP+Zk7EHMACKg8DpIw==
3297+
"@sentry/minimal@5.11.2":
3298+
version "5.11.2"
3299+
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.11.2.tgz#ae417699342266ecd109a97e53cd9519c0893b21"
3300+
integrity sha512-oNuJuz3EZhVtamzABmPdr6lcYo06XHLWb2LvgnoNaYcMD1ExUSvhepOSyZ2h5STCMbmVgGVfXBNPV9RUTp8GZg==
33013301
dependencies:
3302-
"@sentry/hub" "5.8.0"
3303-
"@sentry/types" "5.7.1"
3302+
"@sentry/hub" "5.11.2"
3303+
"@sentry/types" "5.11.0"
33043304
tslib "^1.9.3"
33053305

3306-
"@sentry/types@5.7.1":
3307-
version "5.7.1"
3308-
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.7.1.tgz#4c4c1d4d891b6b8c2c3c7b367d306a8b1350f090"
3309-
integrity sha512-tbUnTYlSliXvnou5D4C8Zr+7/wJrHLbpYX1YkLXuIJRU0NSi81bHMroAuHWILcQKWhVjaV/HZzr7Y/hhWtbXVQ==
3306+
"@sentry/types@5.11.0":
3307+
version "5.11.0"
3308+
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.11.0.tgz#40f0f3174362928e033ddd9725d55e7c5cb7c5b6"
3309+
integrity sha512-1Uhycpmeo1ZK2GLvrtwZhTwIodJHcyIS6bn+t4IMkN9MFoo6ktbAfhvexBDW/IDtdLlCGJbfm8nIZerxy0QUpg==
33103310

3311-
"@sentry/utils@5.8.0":
3312-
version "5.8.0"
3313-
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.8.0.tgz#34683088159b9935f973b6e6cad1a1cc26bbddac"
3314-
integrity sha512-KDxUvBSYi0/dHMdunbxAxD3389pcQioLtcO6CI6zt/nJXeVFolix66cRraeQvqupdLhvOk/el649W4fCPayTHw==
3311+
"@sentry/utils@5.11.1":
3312+
version "5.11.1"
3313+
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.11.1.tgz#aa19fcc234cf632257b2281261651d2fac967607"
3314+
integrity sha512-O0Zl4R2JJh8cTkQ8ZL2cDqGCmQdpA5VeXpuBbEl1v78LQPkBDISi35wH4mKmLwMsLBtTVpx2UeUHBj0KO5aLlA==
33153315
dependencies:
3316-
"@sentry/types" "5.7.1"
3316+
"@sentry/types" "5.11.0"
33173317
tslib "^1.9.3"
33183318

33193319
"@sentry/webpack-plugin@^1.8.0":

0 commit comments

Comments
 (0)