Files
klz-cables.com/.pnpm-store/v10/files/72/00a9d33e4ff6d41bb250dc348f37af2d0576bcbfe539d5de09b14a06c2e003d31c6384fd0513b7e3a69e72033d2f5fcd3c3d45b6d639a7984159b4175d5772
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

52 lines
1.8 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const react = require('@sentry/react');
const nextRoutingInstrumentation = require('./routing/nextRoutingInstrumentation.js');
/**
* A custom browser tracing integration for Next.js.
*/
function browserTracingIntegration(
options = {},
) {
const browserTracingIntegrationInstance = react.browserTracingIntegration({
...options,
instrumentNavigation: false,
instrumentPageLoad: false,
onRequestSpanStart(...args) {
const [span, { headers }] = args;
// Next.js prefetch requests have a `next-router-prefetch` header
if (headers?.get('next-router-prefetch')) {
span?.setAttribute('http.request.prefetch', true);
}
return options.onRequestSpanStart?.(...args);
},
});
const { instrumentPageLoad = true, instrumentNavigation = true } = options;
return {
...browserTracingIntegrationInstance,
afterAllSetup(client) {
// We need to run the navigation span instrumentation before the `afterAllSetup` hook on the normal browser
// tracing integration because we need to ensure the order of execution is as follows:
// Instrumentation to start span on RSC fetch request runs -> Instrumentation to put tracing headers from active span on fetch runs
// If it were the other way around, the RSC fetch request would not receive the tracing headers from the navigation transaction.
if (instrumentNavigation) {
nextRoutingInstrumentation.nextRouterInstrumentNavigation(client);
}
browserTracingIntegrationInstance.afterAllSetup(client);
if (instrumentPageLoad) {
nextRoutingInstrumentation.nextRouterInstrumentPageLoad(client);
}
},
};
}
exports.browserTracingIntegration = browserTracingIntegration;
//# sourceMappingURL=browserTracingIntegration.js.map