Next.js APM - Setup & Installation Docs | Middleware
Traces | Metrics | App Logs | Custom Logs | Profiling |
---|---|---|---|---|
✅ | ✖️ | ✖️ | ✅ | ✅ |
Infra Agent
Next.js Version
Next.js version 13.4
or above. Check your Next.js version with the following command:OpenTelemetry Version
@opentelemetry/api
package version >= v1.3.0
and < v1.5.0
:Next.js
APM Packagenext.config.js
file:
DOCKER_BRIDGE_GATEWAY_ADDRESS
is the IP address of the gateway between the Docker host and bridge network. This is 172.17.0.1
by default.
Learn more about Docker bridge networking here instrumentation.ts (or .js)
file in your project root
directory or inside the src
folderinstrumentation.ts
file must be located at the root
of your project unless you are using the src
directory. If you are using the src
directory, ensure the instrumentation.ts
file is placed within the src
directory, alongside the pages and app directories.pagesExtension
config option to add suffixespagesExtension: ['ts']
, the instrumentation file should be named instrumentation.ts
. npx create-next-app@latest --example api-routes