This commit replaces the use of Logger with getLogger in various parts of the code to handle logging. The Logger has been replaced with getLogger, which assists in getting logs in an asynchronous manner. In addition to this, it updates the next version in pnpm-lock.yaml from next@14.2.0-canary.61 to next@14.2.0-canary.62 and various other dependencies. Also made minor annotations and comments to the function 'isBrowser' and 'formatCurrency' in the 'utils.ts' file.
15 lines
454 B
TypeScript
15 lines
454 B
TypeScript
/**
|
|
* This file is used to register monitoring instrumentation
|
|
* for your Next.js application.
|
|
*/
|
|
export async function register() {
|
|
// only run in nodejs runtime
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
const { registerInstrumentation } = await import('@kit/monitoring');
|
|
|
|
// Register monitoring instrumentation based on the
|
|
// MONITORING_INSTRUMENTATION_PROVIDER environment variable.
|
|
return registerInstrumentation();
|
|
}
|
|
}
|