File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { routeTree } from './routeTree.gen'
44import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
55import { NotFound } from './components/NotFound'
66import { QueryClient } from '@tanstack/react-query'
7+ import { browserProfilingIntegration } from '@sentry/browser'
78import * as Sentry from '@sentry/tanstackstart-react'
89import {
910 installStaleAppReloadHandlers ,
@@ -20,8 +21,11 @@ if (typeof document !== 'undefined') {
2021 dsn : 'https://ac4bfc43ff4a892f8dc7053c4a50d92f@o4507236158537728.ingest.us.sentry.io/4507236163649536' ,
2122 enabled : import . meta. env . PROD && import . meta. env . MODE !== 'staging' ,
2223 sendDefaultPii : true ,
24+ integrations : [ browserProfilingIntegration ( ) ] ,
2325 // Performance Monitoring
2426 tracesSampleRate : 1.0 , // Capture 100% of the transactions
27+ profileSessionSampleRate : 1.0 ,
28+ profileLifecycle : 'trace' ,
2529 // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
2630 tracePropagationTargets : [ 'localhost' , / ^ h t t p s : \/ \/ t a n s t a c k \. c o m \/ / ] ,
2731 beforeSend ( event , hint ) {
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ function applyHostingHeaders(response: Response, url: URL) {
9393 headers . set ( key , value )
9494 }
9595
96+ const contentType = headers . get ( 'content-type' ) ?. split ( ';' ) [ 0 ] . trim ( )
97+ if ( contentType === 'text/html' ) {
98+ headers . set ( 'Document-Policy' , 'js-profiling' )
99+ }
100+
96101 if ( isFrameEmbeddingAllowed ( url . pathname ) ) {
97102 headers . delete ( 'X-Frame-Options' )
98103 }
You can’t perform that action at this time.
0 commit comments