-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp.tsx
47 lines (40 loc) · 1.49 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { datadogRum } from '@datadog/browser-rum'
if (process.env.DD_RUM_ENABLED === 'true') {
datadogRum.init({
applicationId: process.env.DD_RUM_APP_ID,
clientToken: process.env.DD_RUM_CLIENT_TOKEN,
sessionSampleRate: parseInt(process.env.DD_RUM_SESSION_SAMPLE_RATE),
sessionReplaySampleRate: parseInt(
process.env.DD_RUM_SESSION_REPLAY_SAMPLE_RATE
),
trackUserInteractions:
process.env.DD_RUM_TRACK_USER_INTERACTIONS !== 'false',
trackResources: process.env.DD_RUM_TRACK_RESOURCES !== 'false',
trackLongTasks: process.env.DD_RUM_TRACK_LONG_TASKS !== 'false',
defaultPrivacyLevel: 'mask',
site: process.env.DD_SITE || 'datadoghq.com',
service: process.env.DD_SERVICE || 'cpf-reporter',
env: process.env.DD_ENV,
version: process.env.DD_VERSION,
allowedTracingUrls: [global.RWJS_API_URL],
})
}
import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'
import FatalErrorPage from 'src/pages/FatalErrorPage'
import Routes from 'src/Routes'
import './scaffold.css'
import { AuthProvider, useAuth } from './auth'
import './scss/custom.scss'
const App = () => (
<FatalErrorBoundary page={FatalErrorPage}>
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
<AuthProvider>
<RedwoodApolloProvider useAuth={useAuth}>
<Routes />
</RedwoodApolloProvider>
</AuthProvider>
</RedwoodProvider>
</FatalErrorBoundary>
)
export default App