feat: Add Sentry support (#745) (#747)

This commit is contained in:
Benoit TELLIER
2026-04-06 14:00:50 +07:00
committed by GitHub
parent 8c6d846dfe
commit fbb31e4a80
5 changed files with 112 additions and 3 deletions
+15 -3
View File
@@ -1,17 +1,29 @@
import React from 'react'
import { createRoot } from 'react-dom/client'
import { Provider } from 'react-redux'
import * as Sentry from '@sentry/react'
import App from './App'
import { store } from './app/store'
if (window.SENTRY_DSN) {
Sentry.init({
dsn: window.SENTRY_DSN,
integrations: [
Sentry.captureConsoleIntegration({ levels: ['warn', 'error'] })
]
})
}
const container = document.getElementById('root')
if (!container) throw new Error('Root element not found')
const root = createRoot(container)
root.render(
<React.StrictMode>
<Provider store={store}>
<App />
</Provider>
<Sentry.ErrorBoundary>
<Provider store={store}>
<App />
</Provider>
</Sentry.ErrorBoundary>
</React.StrictMode>
)
+2
View File
@@ -20,6 +20,8 @@ declare global {
VIDEO_CONFERENCE_BASE_URL: string
SUPPORT_URL: string
SENTRY_DSN: string | undefined
DEBUG: boolean
LANG: string