rsnext/test/e2e/opentelemetry/instrumentation.ts
2023-03-16 16:35:07 +00:00

11 lines
394 B
TypeScript

export function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
if (process.env.__NEXT_TEST_MODE) {
require('./instrumentation-node-test').register()
} else {
// We use this instrumentation for easier debugging with this test.
// We want this test to be executable with `pnpm next-with-deps`.
require('./instrumentation-node').register()
}
}
}