Skip to content

Commit bf50048

Browse files
authored
Update sentry.ts
1 parent 6d3193a commit bf50048

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/demo/frontend/src/sentry.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import * as Sentry from '@sentry/react';
22

3-
if (location.hostname.includes('nusr.github.io')) {
3+
if (
4+
typeof window !== 'undefined' &&
5+
window.location.hostname === 'nusr.github.io' &&
6+
!Sentry.isInitialized()
7+
) {
48
Sentry.init({
59
dsn: 'https://b292d91ba509038c141ecfc7d10e7bb7@o4506851168092160.ingest.us.sentry.io/4506851171041280',
610
integrations: [
@@ -20,11 +24,7 @@ if (location.hostname.includes('nusr.github.io')) {
2024
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
2125
tracesSampleRate: 1.0,
2226
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
23-
tracePropagationTargets: [
24-
/^\//,
25-
/^https:\/\/nusr.github.io\//,
26-
'nusr.github.io',
27-
],
27+
tracePropagationTargets: [/^https:\/\/nusr\.github\.io/],
2828
// Capture Replay for 10% of all sessions,
2929
// plus for 100% of sessions with an error
3030
// Learn more at

0 commit comments

Comments
 (0)