Removed RewriteFrames integration from Sentry (#18779)

no issue

- Unfortunately the RewriteFrames plugin was not successful in fixing
the duplicated `/assets/assets` in the Sentry stacktraces for admin
- This commit removes the RewriteFrames plugin and reverts the changes
so there will at least be some kind of source code reaching Sentry
This commit is contained in:
Chris Raible 2023-10-26 15:04:48 -07:00 committed by GitHub
parent 42ac31a270
commit 3a88027611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 66 deletions

View File

@ -3,11 +3,9 @@ import React from 'react';
import ReactDOM from 'react-dom';
import Route from '@ember/routing/route';
import ShortcutsRoute from 'ghost-admin/mixins/shortcuts-route';
import appConfig from 'ghost-admin/config/environment';
import ctrlOrCmd from 'ghost-admin/utils/ctrl-or-cmd';
import windowProxy from 'ghost-admin/utils/window-proxy';
import {InitSentryForEmber} from '@sentry/ember';
import {RewriteFrames} from '@sentry/integrations';
import {importSettings} from '../components/admin-x/settings';
import {inject} from 'ghost-admin/decorators/inject';
import {
@ -181,20 +179,6 @@ export default Route.extend(ShortcutsRoute, {
event.tags.grammarly = !!document.querySelector('[data-gr-ext-installed]');
return event;
},
integrations: [
new RewriteFrames({
iteratee: (frame) => {
if (this.config.sentry_env === 'production') {
// Remove duplicate `assets/` from CDN file paths (unsure why this occurs though)
if (frame.filename?.startsWith(appConfig.cdnUrl) && frame.filename?.includes('assets/')) {
frame.filename = frame.filename.replace('assets/', '');
}
}
return frame;
}
})
],
// TransitionAborted errors surface from normal application behaviour
// - https://github.com/emberjs/ember.js/issues/12505
ignoreErrors: [/^TransitionAborted$/]

View File

@ -40,7 +40,6 @@
"@glimmer/component": "1.1.2",
"@html-next/vertical-collection": "3.0.0",
"@sentry/ember": "7.70.0",
"@sentry/integrations": "7.75.1",
"@tryghost/color-utils": "0.1.24",
"@tryghost/ember-promise-modals": "2.0.1",
"@tryghost/helpers": "1.1.77",

View File

@ -4869,14 +4869,6 @@
"@sentry/utils" "7.73.0"
tslib "^2.4.1 || ^1.9.3"
"@sentry/core@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.75.1.tgz#f48cc424990ee4f31541e93f2c0277bfd5be9ed3"
integrity sha512-Kw4KyKBxbxbh8OKO0S11Tm0gWP+6AaXXYrsq3hp8H338l/wOmIzyckmCbUrc/XJeoRqaFLJbdcCrcUEDZUvsVQ==
dependencies:
"@sentry/types" "7.75.1"
"@sentry/utils" "7.75.1"
"@sentry/ember@7.70.0":
version "7.70.0"
resolved "https://registry.yarnpkg.com/@sentry/ember/-/ember-7.70.0.tgz#8f0d6c197384e1932278f76313175a84447eea3c"
@ -4891,16 +4883,6 @@
ember-cli-htmlbars "^6.1.1"
ember-cli-typescript "^5.1.1"
"@sentry/integrations@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.75.1.tgz#bfe83ce25606a5b47cb585dd51feef81fc86e00d"
integrity sha512-qSCyTNX3DiL1aYRmdq10LRhPLfh1KJYKhbmGszC1PII4mt9FbLVmC8fSXiDbhgiuSUKKrDE+J2lC//w688lvHw==
dependencies:
"@sentry/core" "7.75.1"
"@sentry/types" "7.75.1"
"@sentry/utils" "7.75.1"
localforage "^1.8.1"
"@sentry/node@7.70.0":
version "7.70.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.70.0.tgz#3d62ee1d7c762a3d15ab1967ab8e6acc805a241a"
@ -4966,11 +4948,6 @@
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.73.0.tgz#6d811bbe413d319df0a592a672d6d72a94a8e716"
integrity sha512-/v8++bly8jW7r4cP2wswYiiVpn7eLLcqwnfPUMeCQze4zj3F3nTRIKc9BGHzU0V+fhHa3RwRC2ksqTGq1oJMDg==
"@sentry/types@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.75.1.tgz#48b11336a0e70433d41bbe41c617dd339d4992ea"
integrity sha512-km+ygqgMDaFfTrbQwdhrptFqx0Oq15jZABqIoIpbaOCkCAMm+tyCqrFS8dTfaq5wpCktqWOy2qU/DOpppO99Cg==
"@sentry/utils@7.70.0":
version "7.70.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.70.0.tgz#825387ceb10cbb1e145357394b697a1a6d60eb74"
@ -4987,13 +4964,6 @@
"@sentry/types" "7.73.0"
tslib "^2.4.1 || ^1.9.3"
"@sentry/utils@7.75.1":
version "7.75.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.75.1.tgz#169040ba13ff4d4ecccb7b7aa23f84724d108b97"
integrity sha512-QzW2eRjY20epD//9/tQ0FTNwdAL6XZi+LyJNUQIeK3NMnc5NgHrgpxId87gmFq8cNx47utH1Blub8RuMbKqiwQ==
dependencies:
"@sentry/types" "7.75.1"
"@sidvind/better-ajv-errors@^2.0.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@sidvind/better-ajv-errors/-/better-ajv-errors-2.1.0.tgz#54f4216d2200d60e90ec25c6a27c1ea3afdc6cdf"
@ -19757,11 +19727,6 @@ image-size@^0.8.1:
dependencies:
queue "6.0.1"
immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
import-fresh@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546"
@ -21787,13 +21752,6 @@ lib0@0.2.87, lib0@^0.2.74, lib0@^0.2.85:
dependencies:
isomorphic.js "^0.2.4"
lie@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==
dependencies:
immediate "~3.0.5"
liftoff@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3"
@ -21964,13 +21922,6 @@ local-pkg@^0.4.3:
resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963"
integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==
localforage@^1.8.1:
version "1.10.0"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
dependencies:
lie "3.1.1"
locate-character@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/locate-character/-/locate-character-2.0.5.tgz#f2d2614d49820ecb3c92d80d193b8db755f74c0f"