Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move sentry to a new, clean project #3410

Merged
merged 1 commit into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/scripts/sentry-create-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const COMMIT_HASH = childProcess
console.log('Marking this release in Sentry');
try {
childProcess.execSync(
`yarn sentry-cli releases --org=codesandbox -p frontend new "${VERSION}"`
`yarn sentry-cli releases --org=codesandbox -p client new "${VERSION}"`
);
childProcess.execSync(
`yarn sentry-cli releases --org=codesandbox set-commits "${VERSION}" --commit "codesandbox/codesandbox-client@${COMMIT_HASH}"`
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if (process.env.NODE_ENV === 'production') {

try {
initializeSentry(
'https://3943f94c73b44cf5bb2302a72d52e7b8@sentry.io/155188'
'https://f595bc90ce3646c4a9d76a8d3b84b403@sentry.io/2071895'
);

overmind.eventHub.on('action:start', event => {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@babel/polyfill": "^7.4.4",
"@codesandbox/notifications": "^1.0.6",
"@codesandbox/template-icons": "^1.1.0",
"@sentry/browser": "^5.9.0",
"@sentry/browser": "^5.11.2",
"@styled-system/css": "^5.0.23",
"@tippy.js/react": "^3.1.1",
"babel-plugin-preval": "^3.0.1",
Expand Down
17 changes: 17 additions & 0 deletions packages/common/src/utils/analytics/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,26 @@ function getSentry(): Promise<typeof import('@sentry/browser')> {
return import(/* webpackChunkName: 'sentry' */ '@sentry/browser');
}

let latestVersionPromise: Promise<string>;
function getLatestVersion() {
if (!latestVersionPromise) {
latestVersionPromise = fetch('/version.txt')
.then(x => x.text())
.catch(x => '');
}

return latestVersionPromise;
}

export async function initialize(dsn: string) {
if (!DO_NOT_TRACK_ENABLED) {
_Sentry = await getSentry();
const latestVersion = await getLatestVersion();

if (VERSION !== latestVersion) {
// If we're not running the latest version we don't want to see the errors appear
return Promise.resolve();
}

return _Sentry.init({
dsn,
Expand Down
74 changes: 37 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3252,14 +3252,14 @@
conventional-changelog "0.0.17"
github-url-from-git "^1.4.0"

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

"@sentry/cli@^1.44.4", "@sentry/cli@^1.47.1":
Expand All @@ -3274,46 +3274,46 @@
progress "2.0.0"
proxy-from-env "^1.0.0"

"@sentry/core@5.8.0":
version "5.8.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.8.0.tgz#bbfd2f4711491951a8e3a0e8fa8b172fdf7bff6f"
integrity sha512-aAh2KLidIXJVGrxmHSVq2eVKbu7tZiYn5ylW6yzJXFetS5z4MA+JYaSBaG2inVYDEEqqMIkb17TyWxxziUDieg==
"@sentry/core@5.11.2":
version "5.11.2"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.11.2.tgz#f2d9d37940d291dbcb9a9e4a012f76919474bdf6"
integrity sha512-IFCXGy7ebqIq/Kb8RVryCo/SjwhPcrfBmOjkicr4+DxN1UybLre2N3p9bejQMPIteOfDVHlySLYeipjTf+mxZw==
dependencies:
"@sentry/hub" "5.8.0"
"@sentry/minimal" "5.8.0"
"@sentry/types" "5.7.1"
"@sentry/utils" "5.8.0"
"@sentry/hub" "5.11.2"
"@sentry/minimal" "5.11.2"
"@sentry/types" "5.11.0"
"@sentry/utils" "5.11.1"
tslib "^1.9.3"

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

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

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

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

"@sentry/webpack-plugin@^1.8.0":
Expand Down