Learn how to instrument your Next.js application with infrastack.ai and OpenTelemetry for comprehensive observability and performance insights.
Install the NPM package
Prepare your environment
.env
file in the root of your project and add your API key.Configure your Next.js application
instrumentationHook
and serverComponentsExternalPackages
are expermiental. Please follow the Official Next.js Documentation for instrumentationHook if this document is outdated.Create instrumentation.ts
src
folder in your Next.js application, create an instrumentation.ts
file there. If not, create the file in the root of your project.Run your application