Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
import { NotFound } from './components/NotFound'
import { QueryClient } from '@tanstack/react-query'
import * as Sentry from '@sentry/tanstackstart-react'
import { installStaleAppReloadHandlers } from './utils/stale-app-reload'
import {
installStaleAppReloadHandlers,
staleAppErrorPatterns,
} from './utils/stale-app-reload'
import { redactByokRequestHeaders } from './utils/sentry-redaction'

if (typeof document !== 'undefined') {
Expand All @@ -14,6 +17,7 @@ if (typeof document !== 'undefined') {
Sentry.init({
dsn: 'https://ac4bfc43ff4a892f8dc7053c4a50d92f@o4507236158537728.ingest.us.sentry.io/4507236163649536',
sendDefaultPii: true,
ignoreErrors: staleAppErrorPatterns,
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
Expand Down
2 changes: 1 addition & 1 deletion src/utils/stale-app-reload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
const staleAppReloadKey = 'tanstack-stale-app-reload-at'
const staleAppReloadWindowMs = 10_000

const staleAppErrorPatterns = [
export const staleAppErrorPatterns = [
'ChunkLoadError',
'Failed to fetch dynamically imported module',
'Importing a module script failed',
Expand Down
Loading