Skip to content

Commit 730aece

Browse files
Merge pull request #158 from decentraland/fix/log-sentry-init
fix: Log sentry initialization
2 parents 2588cd7 + 6e274e0 commit 730aece

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/lib/sentry.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ let sentryClient: ReturnType<typeof Sentry.init>
1212

1313
export function initSentry() {
1414
const SENTRY_DSN = config.get('SENTRY_DSN')
15+
const ENVIRONMENT = config.get('ENVIRONMENT')
16+
const release = `${config.get('SENTRY_RELEASE_PREFIX', 'wearable-preview')}@${import.meta.env.VITE_REACT_APP_WEBSITE_VERSION}`
17+
const enabled = !config.is(Env.DEVELOPMENT)
1518

1619
sentryClient = Sentry.init({
1720
dsn: SENTRY_DSN,
18-
environment: config.get('ENVIRONMENT'),
19-
release: `${config.get('SENTRY_RELEASE_PREFIX', 'wearable-preview')}@${import.meta.env.VITE_REACT_APP_WEBSITE_VERSION}`,
20-
enabled: !config.is(Env.DEVELOPMENT),
21+
environment: ENVIRONMENT,
22+
release,
23+
enabled,
2124
defaultIntegrations: false,
2225
integrations: [
2326
globalHandlersIntegration(),
@@ -38,6 +41,12 @@ export function initSentry() {
3841
},
3942
},
4043
})
44+
45+
console.log('Sentry initialized', {
46+
environment: ENVIRONMENT,
47+
dsn: SENTRY_DSN,
48+
release,
49+
})
4150
}
4251

4352
/**

0 commit comments

Comments
 (0)