Skip to content

Commit e7ffa49

Browse files
committed
chore: update sentry code
1 parent 98f173a commit e7ffa49

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

src/main.ts

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
import { enableProdMode } from '@angular/core';
22
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3-
import * as Sentry from '@sentry/angular';
4-
import { Integrations } from '@sentry/tracing';
3+
import { init, browserTracingIntegration } from '@sentry/angular';
54
import { AppModule } from './app/app.module';
65
import { environment } from './environments/environment';
76

8-
// const initSentry = () => {
9-
// Sentry.init({
10-
// dsn: 'https://[email protected]/5569161',
11-
// autoSessionTracking: true,
12-
// integrations: [
13-
// new Integrations.BrowserTracing({
14-
// tracingOrigins: ['localhost', 'https://jira.trungk18.com/'],
15-
// routingInstrumentation: Sentry.routingInstrumentation
16-
// })
17-
// ],
7+
const initSentry = () => {
8+
init({
9+
dsn: 'https://[email protected]/5569161',
10+
integrations: [
11+
browserTracingIntegration(),
12+
],
13+
tracePropagationTargets: ['localhost', 'jira.trungk18.com'],
14+
tracesSampleRate: 1.0
15+
});
16+
};
1817

19-
// tracesSampleRate: 1.0
20-
// });
21-
// };
22-
23-
// if (environment.production) {
24-
// enableProdMode();
25-
// initSentry();
26-
// }
18+
if (environment.production) {
19+
enableProdMode();
20+
initSentry();
21+
}
2722

2823
platformBrowserDynamic()
2924
.bootstrapModule(AppModule)

0 commit comments

Comments
 (0)