Skip to content

Commit

Permalink
init sentry only on production
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendphil committed Jan 21, 2025
1 parent e59f0e4 commit 30da605
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
27 changes: 14 additions & 13 deletions deployables/app/app/entry.client.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import * as Sentry from '@sentry/react'
import React from 'react'
import ReactDOM from 'react-dom/client'
import { HydratedRouter } from 'react-router/dom'
import './app.css'

import * as Sentry from '@sentry/react'

Sentry.init({
dsn: 'https://23cb3bbf49ea43ed9bbaf41199c40d1c@o4508675621912576.ingest.us.sentry.io/4508676926078976',
integrations: [Sentry.browserTracingIntegration()],
// Tracing
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: [
'localhost',
/^https:\/\/app\.pilot\.gnosisguild\.org/,
],
})
if (process.env.NODE_ENV === 'production') {
Sentry.init({
dsn: 'https://23cb3bbf49ea43ed9bbaf41199c40d1c@o4508675621912576.ingest.us.sentry.io/4508676926078976',
integrations: [Sentry.browserTracingIntegration()],
// Tracing
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: [
'localhost',
/^https:\/\/app\.pilot\.gnosisguild\.org/,
],
})
}

ReactDOM.hydrateRoot(
document,
Expand Down
2 changes: 1 addition & 1 deletion deployables/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"type": "module",
"scripts": {
"build": "react-router build",
"build": "NODE_ENV=production react-router build",
"dev": "react-router dev",
"start": "wrangler dev",
"check-types": "react-router typegen && tsc -b",
Expand Down

0 comments on commit 30da605

Please sign in to comment.