nextjs-opentelemetry-instrumentation
Installation
SKILL.md
Next.js OpenTelemetry Instrumentation
Implement distributed tracing for Next.js 14+ App Router applications using OpenTelemetry to track requests from browser through Server Components to API routes.
Setup
1. Install Dependencies
npm install @opentelemetry/sdk-node @opentelemetry/api \
@opentelemetry/auto-instrumentations-node \
@opentelemetry/exporter-trace-otlp-http \
@vercel/otel
2. Create instrumentation.ts
Next.js calls this file on server startup before handling requests: