mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-24 17:41:27 -04:00
Enable Sentry only for non-local environments
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
import {SENTRY_DSN} from 'common/hosting/constants'
|
||||
import {IS_LOCAL, SENTRY_DSN} from 'common/hosting/constants'
|
||||
|
||||
const IS_NATIVE = !!process.env.NEXT_PUBLIC_WEBVIEW
|
||||
|
||||
@@ -11,6 +11,8 @@ Sentry.init({
|
||||
// Skip tunneling in native app context
|
||||
dsn: SENTRY_DSN,
|
||||
|
||||
enabled: !IS_LOCAL,
|
||||
|
||||
// Add optional integrations for additional features
|
||||
integrations: IS_NATIVE ? [] : [Sentry.replayIntegration()],
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
import {SENTRY_DSN} from 'common/hosting/constants'
|
||||
import {IS_LOCAL, SENTRY_DSN} from 'common/hosting/constants'
|
||||
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
|
||||
enabled: !IS_LOCAL,
|
||||
|
||||
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
||||
tracesSampleRate: 0.1,
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
import {SENTRY_DSN} from 'common/hosting/constants'
|
||||
import {IS_LOCAL, SENTRY_DSN} from 'common/hosting/constants'
|
||||
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
|
||||
enabled: !IS_LOCAL,
|
||||
|
||||
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
||||
tracesSampleRate: 0.1,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user