Skip to content

Commit

Permalink
Merge pull request #1270 from dandi/sentry-performance-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandenburgh authored Sep 19, 2022
2 parents c3bd90f + a4f88e2 commit 4389285
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 46 deletions.
4 changes: 4 additions & 0 deletions dandiapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
TestingBaseConfiguration,
)
from configurations import values
from corsheaders.defaults import default_headers
from dandischema.consts import DANDI_SCHEMA_VERSION as _DANDI_SCHEMA_VERSION


Expand All @@ -25,6 +26,9 @@ class DandiMixin(ConfigMixin):

DANDI_ALLOW_LOCALHOST_URLS = False

# Needed for Sentry Performance to work in frontend
CORS_ALLOW_HEADERS = default_headers + ('baggage', 'sentry-trace')

@staticmethod
def mutate_configuration(configuration: type[ComposedConfiguration]):
# Install local apps first, to ensure any overridden resources are found first
Expand Down
5 changes: 3 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"@apidevtools/json-schema-ref-parser": "^9.0.7",
"@girder/oauth-client": "^0.7.7",
"@koumoul/vjsf": "^2.5.2",
"@sentry/integrations": "^7.12.1",
"@sentry/vue": "^7.12.1",
"@sentry/integrations": "^7.13.0",
"@sentry/tracing": "^7.13.0",
"@sentry/vue": "^7.13.0",
"ajv": "^8.3.0",
"axios": "^0.21.2",
"core-js": "^3.12.1",
Expand Down
6 changes: 6 additions & 0 deletions web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import VueSocialSharing from 'vue-social-sharing';
// @ts-ignore missing definitions
import * as Sentry from '@sentry/vue';
import { CaptureConsole } from '@sentry/integrations';
import { BrowserTracing } from '@sentry/tracing';

// Import plugins first (order may matter)
import pinia from '@/plugins/pinia';
Expand All @@ -22,10 +23,15 @@ Sentry.init({
dsn: process.env.VUE_APP_SENTRY_DSN,
environment: process.env.VUE_APP_SENTRY_ENVIRONMENT,
integrations: [
new BrowserTracing({
tracingOrigins: [process.env.VUE_APP_DANDI_API_ROOT || ''],
}),
new CaptureConsole({
levels: ['error'],
}),
],
tracesSampleRate: 0.01,
trackComponents: true,
});

Vue.use(VueGtag, {
Expand Down
98 changes: 54 additions & 44 deletions web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1187,67 +1187,77 @@
form-data "^4.0.0"
opener "^1.5.2"

"@sentry/browser@7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.12.1.tgz#2be6fa5c2529a2a75abac4d00aca786362302a1a"
integrity sha512-pgyL65CrGFLe8sKcEG8KXAuVTE8zkAsyTlv/AuME06cSdxzO/memPK/r3BI6EM7WupIdga+V5tQUldeT1kgHNA==
dependencies:
"@sentry/core" "7.12.1"
"@sentry/types" "7.12.1"
"@sentry/utils" "7.12.1"
"@sentry/browser@7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.13.0.tgz#883b8598c8a0c33af246242e7172e39306dc564a"
integrity sha512-WbgClHPYe8TKsdVVbuzd6alxwh3maFQNuljMkSTnYvPx2P+NT0wHljTs37D39FGfSmAwaqn7D/1ZHAtC+6mWxA==
dependencies:
"@sentry/core" "7.13.0"
"@sentry/types" "7.13.0"
"@sentry/utils" "7.13.0"
tslib "^1.9.3"

"@sentry/core@7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.12.1.tgz#a22f1c530ed528a699ed204c36eb5fc8d308103d"
integrity sha512-DFHbzHFjukhlkRZ5xzfebx0IBzblW43kmfnalBBq7xEMscUvnhsYnlvL9Y20tuPZ/PrTcq4JAHbFluAvw6M0QQ==
"@sentry/core@7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.13.0.tgz#65597d71f8bfa1186f34009803e03ca9edb3adee"
integrity sha512-hB46fklmKrSDMEvZOF8qBHhys7PONBFyxQtbNDZUlv/kabs4gF3VEg1ftCaXnjx4lLNlsUl/ScFdM6194RvISg==
dependencies:
"@sentry/hub" "7.12.1"
"@sentry/types" "7.12.1"
"@sentry/utils" "7.12.1"
"@sentry/hub" "7.13.0"
"@sentry/types" "7.13.0"
"@sentry/utils" "7.13.0"
tslib "^1.9.3"

"@sentry/hub@7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.12.1.tgz#dffad40cd2b8f44df2d5f20a89df87879cbbf1c3"
integrity sha512-KLVnVqXf+CRmXNy9/T8K2/js7QvOQ94xtgP5KnWJbu2rl+JhxnIGiBRF51lPXFIatt7zWwB9qNdMS8lVsvLMGQ==
"@sentry/hub@7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.13.0.tgz#752068e528cfb277ed154bc94e311cad50ef792e"
integrity sha512-88/GsD1BoyrBwRKJCmVHZtSH5rizOsImUHWEXc1AOa1aR8nanfn56JdAbd6tC55pA+nT4R4H4vN/PrUaomTbtg==
dependencies:
"@sentry/types" "7.12.1"
"@sentry/utils" "7.12.1"
"@sentry/types" "7.13.0"
"@sentry/utils" "7.13.0"
tslib "^1.9.3"

"@sentry/integrations@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.12.1.tgz#da1dbc5d851f2fc9413883812c436a1540a5b27a"
integrity sha512-35iW3WZ6rnUzjf6kWS5604xtPCtIb4gESoDKIKPKw2q7gI+qA5Ad/Q5yM50cDwoR3uOhXZ4tv3WB2/16wSGWFg==
"@sentry/integrations@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.13.0.tgz#abd36fbf4a338877ca15ef5ed830163eeb6394ac"
integrity sha512-el5tonn/96fC+GMco70TXI2yrGmDLSFc0THKO/r9YEIJjqcK1KV1C6jJhTWt09ZBAgoeRCXSMn5xvdl3fc9Zrw==
dependencies:
"@sentry/types" "7.12.1"
"@sentry/utils" "7.12.1"
"@sentry/types" "7.13.0"
"@sentry/utils" "7.13.0"
localforage "^1.8.1"
tslib "^1.9.3"

"@sentry/types@7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.12.1.tgz#eff76d938f9effc62a2ec76cd5c3f04de37f5c15"
integrity sha512-VGZs39SZgMcCGv7H0VyFy1LEFGsnFZH590JUopmz6nG63EpeYQ2xzhIoPNAiLKbyUvBEwukn+faCg3u3MGqhgQ==
"@sentry/tracing@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.13.0.tgz#521dc021dab78e37e29b0f90b01cb444337adfc4"
integrity sha512-/MKSd25rGv6Pc0FPBLXJifkfvSaYVPA8XUOLzVeDN0gl07h8AXli4qG9amTh/4Wb5h4dFpbcscOvW2VC+pxkIA==
dependencies:
"@sentry/hub" "7.13.0"
"@sentry/types" "7.13.0"
"@sentry/utils" "7.13.0"
tslib "^1.9.3"

"@sentry/types@7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.13.0.tgz#398e33e5c92ea0ce91e2c86e3ab003fe00c471a2"
integrity sha512-ttckM1XaeyHRLMdr79wmGA5PFbTGx2jio9DCD/mkEpSfk6OGfqfC7gpwy7BNstDH/VKyQj/lDCJPnwvWqARMoQ==

"@sentry/utils@7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.12.1.tgz#fcf80fdc332d0bd288e21b13efc7a2f0d604f75a"
integrity sha512-Dh8B13pC0u8uLM/zf+oZngyg808c6BDEO94F7H+h3IciCVVd92A0cOQwLGAEdf8srnJgpZJNAlSC8lFDhbFHzQ==
"@sentry/utils@7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.13.0.tgz#0d47a9278806ece78ba3a83c7dbebce817462759"
integrity sha512-jnR85LgRLSk7IQe2OhKOPMY4fasJCNQNW0iCXsH+S2R1qnsF+N4ksNkQ+7JyyM9E7F03YpI2qd76bKY0VIn5iA==
dependencies:
"@sentry/types" "7.12.1"
"@sentry/types" "7.13.0"
tslib "^1.9.3"

"@sentry/vue@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-7.12.1.tgz#cb8a93384be40e3389333547fbe443f8a2615fa4"
integrity sha512-p8Z1CrjVgHBK+Udb/X+bl5MTs3faGMMwZlcTtcMG0ZIY54V1GkvAsGBn3EFoe0yGCv6UFiuS90CxTfh0XtZavg==
"@sentry/vue@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-7.13.0.tgz#4cefb061af3bacbc6f3cd9c287af762dad1ab74d"
integrity sha512-+OP0h4hE8Gz8xwN3rcHrbQpqhNQGQJoM8f7cOPw7TU7TCXj4apMsR4o5xPVlvSZl3TG0J9SBUPrZdd0Va9gptw==
dependencies:
"@sentry/browser" "7.12.1"
"@sentry/core" "7.12.1"
"@sentry/types" "7.12.1"
"@sentry/utils" "7.12.1"
"@sentry/browser" "7.13.0"
"@sentry/core" "7.13.0"
"@sentry/types" "7.13.0"
"@sentry/utils" "7.13.0"
tslib "^1.9.3"

"@soda/friendly-errors-webpack-plugin@^1.7.1":
Expand Down

0 comments on commit 4389285

Please sign in to comment.