フロントエンド開発の先端を突っ走るNext.js
next.js アプリの初期化( npx create-next-app@latest <アプリ名> ) または yarn create next-app <アプリ名> または bun create next-app <アプリ名> )

next.js instrumentation.ts

next.config.js にて instrumentationHook を有効にする

module.exports = {
  experimental: {
    instrumentationHook: true,
  },
}
export async function register() {
  if (process.env.NEXT_RUNTIME === "nodejs") {
    await import("./instrumentation.node.ts");
  }
}

https://nextjs.org/docs/app/guides/open-telemetry

https://harith-sankalpa.medium.com/a-complete-guide-to-instrumenting-next-js-with-opentelemetry-and-pino-logger-54cf5734a40c

https://www.highlight.io/blog/new-error-management-ui

https://gigazine.net/news/20230722-highlight-io/

No.2610
05/22 15:57

edit