mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
Added JavaScript Profiling with Sentry
This commit is contained in:
parent
d03340dd5a
commit
a3c568d5a1
2 changed files with 26 additions and 2 deletions
|
@ -23,6 +23,19 @@ const nextConfig: NextConfig = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
async headers() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: '/:path*',
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: 'Document-Policy',
|
||||||
|
value: 'js-profiling',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||||
compress: true,
|
compress: true,
|
||||||
serverMiddleware: [compression()],
|
serverMiddleware: [compression()],
|
||||||
|
|
|
@ -19,8 +19,19 @@ Sentry.init({
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
// Set tracesSampleRate to 1.0 to capture 100%
|
||||||
tracesSampleRate: 1,
|
// of transactions for tracing.
|
||||||
|
// We recommend adjusting this value in production
|
||||||
|
tracesSampleRate: 1.0,
|
||||||
|
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
|
||||||
|
tracePropagationTargets: ['localhost', /^https:\/\/tasko\.ahmadk953\.org/],
|
||||||
|
|
||||||
|
// Set profilesSampleRate to 1.0 to profile every transaction.
|
||||||
|
// Since profilesSampleRate is relative to tracesSampleRate,
|
||||||
|
// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
|
||||||
|
// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would
|
||||||
|
// result in 25% of transactions being profiled (0.5*0.5=0.25)
|
||||||
|
profilesSampleRate: 1.0,
|
||||||
|
|
||||||
// Define how likely Replay events are sampled.
|
// Define how likely Replay events are sampled.
|
||||||
replaysSessionSampleRate: 0.5,
|
replaysSessionSampleRate: 0.5,
|
||||||
|
|
Loading…
Reference in a new issue