Skip to content

Commit 22150cc

Browse files
committed
chore: change to new sentry
1 parent 816ccd1 commit 22150cc

File tree

4 files changed

+55
-11
lines changed

4 files changed

+55
-11
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"@angular/router": "11.0.0",
4040
"@angular/service-worker": "11.0.0",
4141
"@googlemaps/markerclustererplus": "^1.0.3",
42-
"@sentry/browser": "^5.27.4",
42+
"@sentry/angular": "^5.27.4",
43+
"@sentry/tracing": "^5.27.4",
4344
"@sports-alliance/sports-lib": "^5.4.10",
4445
"@types/pako": "^1.0.1",
4546
"fast-deep-equal": "^3.1.3",

src/app/app.module.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,20 @@ declare function require(moduleName: string): any;
4242

4343
const appPackage = require('../../package.json');
4444

45-
Sentry.init({
46-
dsn: 'https://[email protected]/1194244',
47-
environment: environment.production ? 'Production' : environment.beta ? 'Beta' : 'Development',
48-
release: appPackage.version,
49-
integrations: [new Sentry.Integrations.TryCatch({
50-
XMLHttpRequest: false,
51-
})],
52-
});
45+
// Sentry.init({
46+
// dsn: 'https://[email protected]/1194244',
47+
// environment: environment.production ? 'Production' : environment.beta ? 'Beta' : 'Development',
48+
// release: appPackage.version,
49+
// integrations: [
50+
// // new Sentry.Integrations.TryCatch({
51+
// // XMLHttpRequest: false
52+
// // }),
53+
// new Integrations.BrowserTracing({
54+
// tracingOrigins: ["localhost", "https://yourserver.io/api"],
55+
// routingInstrumentation: Sentry.routingInstrumentation,
56+
// }),
57+
// ],
58+
// });
5359

5460

5561
@NgModule({

src/main.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
import {enableProdMode} from '@angular/core';
22
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
3-
43
import {environment} from './environments/environment';
54
import {AppThemes} from '@sports-alliance/sports-lib/lib/users/settings/user.app.settings.interface';
5+
import * as Sentry from '@sentry/angular';
6+
import { Integrations } from '@sentry/tracing';
67

78
import 'firebase/analytics';
89

10+
Sentry.init({
11+
dsn: 'https://[email protected]/1194244',
12+
integrations: [
13+
new Integrations.BrowserTracing({
14+
tracingOrigins: ['localhost', 'https://quantified-self.io/', 'https://beta.quantified-self.io/'],
15+
routingInstrumentation: Sentry.routingInstrumentation,
16+
}),
17+
],
18+
19+
// We recommend adjusting this value in production, or using tracesSampler
20+
// for finer control
21+
tracesSampleRate: 1.0,
22+
});
23+
924
if (environment.production) {
1025
enableProdMode();
1126
}

yarn.lock

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,18 @@
15341534
semver "7.3.2"
15351535
semver-intersect "1.4.0"
15361536

1537-
"@sentry/browser@^5.27.4":
1537+
"@sentry/angular@^5.27.4":
1538+
version "5.27.4"
1539+
resolved "https://registry.yarnpkg.com/@sentry/angular/-/angular-5.27.4.tgz#7e2f6d14c3505f17018f311fcaedcb8244e54fa2"
1540+
integrity sha512-78xR1OxNtM1kiqVTrG9iPBBNONvZpaL6Pj8sMuLWXT/68C1zJTaaF0ljNFFhDB22b1//cJXwIPeHe3Ax8jV7IA==
1541+
dependencies:
1542+
"@sentry/browser" "5.27.4"
1543+
"@sentry/types" "5.27.4"
1544+
"@sentry/utils" "5.27.4"
1545+
rxjs "^6.6.0"
1546+
tslib "^1.9.3"
1547+
1548+
15381549
version "5.27.4"
15391550
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.27.4.tgz#241dedc7d82d3ed2769bfc8e4fb193d10e6a1d4d"
15401551
integrity sha512-L8Fsnkl3PIak4zJ1pcGDmV92XTQjS2/H6EBgp1rhuOF4OE3L59K8RR73C9w+wVtsIi7nyfYg/FIe8lvG++3Mow==
@@ -1573,6 +1584,17 @@
15731584
"@sentry/types" "5.27.4"
15741585
tslib "^1.9.3"
15751586

1587+
"@sentry/tracing@^5.27.4":
1588+
version "5.27.4"
1589+
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.27.4.tgz#0f6b0ebfa90b9f5bf5bac1fcf0f196010dbdddac"
1590+
integrity sha512-f3nG8ozCdcbFOzsnBCZ8w+/WfoNiAd0Ctr643L0rsFbaSzPWxbPMe3LNVrWwFVo6mHacG3/2HYmJ3CYMiWyTKQ==
1591+
dependencies:
1592+
"@sentry/hub" "5.27.4"
1593+
"@sentry/minimal" "5.27.4"
1594+
"@sentry/types" "5.27.4"
1595+
"@sentry/utils" "5.27.4"
1596+
tslib "^1.9.3"
1597+
15761598
15771599
version "5.27.4"
15781600
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.27.4.tgz#ba7cefae6f77bb39a0ac59aeba1bb23ce4ad5216"

0 commit comments

Comments
 (0)