Add JS Profiling
This commit is contained in:
parent
fb98828358
commit
51a5608f6c
|
|
@ -60,7 +60,7 @@ export default withSentryConfig(nextConfig, {
|
|||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
|
||||
|
||||
// Sourcemap configuration optimized for monorepo
|
||||
sourcemaps: {
|
||||
disable: false,
|
||||
|
|
@ -68,7 +68,7 @@ export default withSentryConfig(nextConfig, {
|
|||
assets: [
|
||||
".next/static/**/*.js",
|
||||
".next/static/**/*.js.map",
|
||||
".next/server/**/*.js",
|
||||
".next/server/**/*.js",
|
||||
".next/server/**/*.js.map",
|
||||
],
|
||||
ignore: [
|
||||
|
|
@ -97,7 +97,7 @@ export default withSentryConfig(nextConfig, {
|
|||
telemetry: false,
|
||||
silent: process.env.NODE_ENV === 'production',
|
||||
debug: process.env.NODE_ENV === 'development',
|
||||
|
||||
|
||||
// Error handling for CI/CD
|
||||
errorHandler: (error) => {
|
||||
console.warn("Sentry build error occurred:", error.message);
|
||||
|
|
@ -105,4 +105,15 @@ export default withSentryConfig(nextConfig, {
|
|||
// Don't fail the build if Sentry upload fails in monorepo context
|
||||
return;
|
||||
},
|
||||
|
||||
// Document-Policy header for browser profiling
|
||||
async headers() {
|
||||
return [{
|
||||
source: "/:path*",
|
||||
headers: [{
|
||||
key: "Document-Policy",
|
||||
value: "js-profiling",
|
||||
}, ],
|
||||
}, ];
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue