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
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
const react = require('@sentry/react');
|
|
const appRouterRoutingInstrumentation = require('./appRouterRoutingInstrumentation.js');
|
|
const pagesRouterRoutingInstrumentation = require('./pagesRouterRoutingInstrumentation.js');
|
|
|
|
/**
|
|
* Instruments the Next.js Client Router for page loads.
|
|
*/
|
|
function nextRouterInstrumentPageLoad(client) {
|
|
const isAppRouter = !react.WINDOW.document.getElementById('__NEXT_DATA__');
|
|
if (isAppRouter) {
|
|
appRouterRoutingInstrumentation.appRouterInstrumentPageLoad(client);
|
|
} else {
|
|
pagesRouterRoutingInstrumentation.pagesRouterInstrumentPageLoad(client);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Instruments the Next.js Client Router for navigation.
|
|
*/
|
|
function nextRouterInstrumentNavigation(client) {
|
|
const isAppRouter = !react.WINDOW.document.getElementById('__NEXT_DATA__');
|
|
if (isAppRouter) {
|
|
appRouterRoutingInstrumentation.appRouterInstrumentNavigation(client);
|
|
} else {
|
|
pagesRouterRoutingInstrumentation.pagesRouterInstrumentNavigation(client);
|
|
}
|
|
}
|
|
|
|
exports.nextRouterInstrumentNavigation = nextRouterInstrumentNavigation;
|
|
exports.nextRouterInstrumentPageLoad = nextRouterInstrumentPageLoad;
|
|
//# sourceMappingURL=nextRoutingInstrumentation.js.map
|