Skip to content

chore: Configure sentry release and trace sample rate #5265

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

Merged
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
6 changes: 3 additions & 3 deletions app/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Sentry from '@sentry/browser';
import { CaptureConsole, Dedupe, Ember } from '@sentry/integrations';
import config from 'open-event-frontend/config/environment';
import { Integrations as ApmIntegrations } from '@sentry/apm';
import { Integrations } from '@sentry/tracing';

if (!config.sentry.dsn.includes('dummy')) {

Expand All @@ -12,7 +12,7 @@ if (!config.sentry.dsn.includes('dummy')) {
new CaptureConsole({
levels: ['error']
}),
new ApmIntegrations.Tracing()
new Integrations.BrowserTracing()
],
beforeSend(event: Sentry.Event) {
const exception = event.exception?.values?.[0];
Expand Down Expand Up @@ -61,7 +61,7 @@ if (!config.sentry.dsn.includes('dummy')) {
scope.addEventProcessor(function(event: Sentry.Event, hints: Sentry.EventHint) {
addAdapterError(hints.originalException, event);

const args: any[] = event.extra?.arguments || [];
const args: any[] = event.extra?.arguments as any[] || [];
for (const arg of args) {
addAdapterError(arg, event);
}
Expand Down
3 changes: 2 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ module.exports = function(environment) {
dsn : process.env.SENTRY_DSN || 'https://[email protected]/dummy',
debug : !!process.env.SENTRY_DSN,
development : !process.env.SENTRY_DSN,
tracesSampleRate: process.env.SENTRY_TRACE_SAMPLE_RATE || 0.01,
release : (process.env.SENTRY_PROJECT_NAME || 'eventyay-frontend') + '@' + process.env.npm_package_version,
tracesSampleRate: process.env.SENTRY_TRACE_SAMPLE_RATE || 0.1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy found an issue: Unexpected trailing comma.

},

emberFullCalendar: {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "open-event-frontend",
"version": "1.0.0",
"version": "1.18.0",
"description": "Front-end for Open Event in Javascript",
"license": "Apache-2.0",
"author": "FOSSASIA",
Expand Down Expand Up @@ -34,10 +34,9 @@
"@glimmer/component": "^1.0.2",
"@glimmer/tracking": "^1.0.2",
"@open-event/theme": "^0.2.2",
"@sentry/apm": "^5.25.0",
"@sentry/browser": "^5.25.0",
"@sentry/integrations": "^5.25.0",
"@sentry/node": "^5.25.0",
"@sentry/tracing": "^5.25.0",
"@types/ember": "^3.16.1",
"@types/ember-data": "^3.16.5",
"@types/ember-qunit": "^3.4.12",
Expand Down
65 changes: 9 additions & 56 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1615,19 +1615,7 @@
hi-base32 "^0.5.0"
zalgo-promise "^1.0.28"

"@sentry/apm@^5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.25.0.tgz#5fc5bd6909ac05c63042b88d82f8e3b58afea224"
integrity sha512-HU1MB/Tb3v+vegdfYmBmdHJ2Nn9RNlgl3tyOa/sN672hWthgMJNzN2VJ5qmLXKNNgmn12X3C6KFQJ2hu5HtyTA==
dependencies:
"@sentry/browser" "5.25.0"
"@sentry/hub" "5.25.0"
"@sentry/minimal" "5.25.0"
"@sentry/types" "5.25.0"
"@sentry/utils" "5.25.0"
tslib "^1.9.3"

"@sentry/[email protected]", "@sentry/browser@^5.25.0":
"@sentry/browser@^5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.25.0.tgz#4e3d2132ba1f2e2b26f73c49cbb6977ee9c9fea9"
integrity sha512-QDVUbUuTu58xCdId0eUO4YzpvrPdoUw1ryVy/Yep9Es/HD0fiSyO1Js0eQVkV/EdXtyo2pomc1Bpy7dbn2EJ2w==
Expand Down Expand Up @@ -1676,22 +1664,7 @@
"@sentry/types" "5.25.0"
tslib "^1.9.3"

"@sentry/node@^5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.25.0.tgz#f3c3300e1d8d77025fadac02ede4f4da7a037c73"
integrity sha512-zxoUVdAFTeK9kdEGY95TMs6g8Zx/P55HxG4gHD80BG/XIEvWiGPcGCLOspO4IdGqYXkGS74KfBOIXmmCawWwLg==
dependencies:
"@sentry/core" "5.25.0"
"@sentry/hub" "5.25.0"
"@sentry/tracing" "5.25.0"
"@sentry/types" "5.25.0"
"@sentry/utils" "5.25.0"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"

"@sentry/[email protected]":
"@sentry/tracing@^5.25.0":
version "5.25.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.25.0.tgz#1cfbcf085a7a3b679f417058d09590298ddaa255"
integrity sha512-KcyHEGFpqSDubHrdWT/vF2hKkjw/ts6NpJ6tPDjBXUNz98BHdAyMKtLOFTCeJFply7/s5fyiAYu44M+M6IG3Bw==
Expand Down Expand Up @@ -2475,13 +2448,6 @@ [email protected]:
version "0.8.2"
resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f"

agent-base@6:
version "6.0.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4"
integrity sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==
dependencies:
debug "4"

ajv-errors@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d"
Expand Down Expand Up @@ -5438,7 +5404,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==

cookie@^0.4.0, cookie@^0.4.1:
cookie@^0.4.0:
version "0.4.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==
Expand Down Expand Up @@ -5738,19 +5704,19 @@ [email protected], debug@^2.1.0, debug@^2.1.1, debug@^2.1.2, debug@^2.1.3, debug@^2.2.
dependencies:
ms "2.0.0"

debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
dependencies:
ms "^2.1.1"

debug@^3.0.1, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
dependencies:
ms "^2.1.1"

debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
dependencies:
ms "^2.1.1"

debug@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
Expand Down Expand Up @@ -10025,14 +9991,6 @@ https-browserify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"

https-proxy-agent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
dependencies:
agent-base "6"
debug "4"

https@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/https/-/https-1.0.0.tgz#3c37c7ae1a8eeb966904a2ad1e975a194b7ed3a4"
Expand Down Expand Up @@ -11529,11 +11487,6 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"

lru_map@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd"
integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=

magic-string@^0.24.0:
version "0.24.1"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.24.1.tgz#7e38e5f126cae9f15e71f0cf8e450818ca7d5a8f"
Expand Down