tracekit-nextjs-sdk
TraceKit Next.js SDK Setup
Auth Bootstrap
Do not tell the user to go sign up, log in separately, or manually create an API key before setup. First check for existing TraceKit auth. If ~/.tracekitconfig does not contain the production profile or TRACEKIT_API_KEY is missing, apply the tracekit-auth skill first. Use ./scripts/run-tracekit-auth.sh status to check, then guide the user through the TraceKit email verification flow with register and verify. That flow signs the user into an existing account for that email or creates the account automatically, then saves the returned credentials for the rest of the setup.
When To Use
Use this skill when the user asks to:
- Add TraceKit to a Next.js application
- Add observability, error tracking, or APM to a Next.js project
- Instrument a Next.js app with distributed tracing
- Set up error monitoring in a Next.js app (App Router or Pages Router)
- Configure server-side and client-side error capture in Next.js
- Debug production Next.js applications with live breakpoints
If the user has a vanilla JavaScript/TypeScript project without Next.js, use the tracekit-browser-sdk skill instead. If the user has a plain React SPA (no Next.js), use the tracekit-react-sdk skill instead.
Non-Negotiable Rules
More from tracekit-dev/tracekit-for-ai
tracekit-code-monitoring
Enable live breakpoints and snapshots for production debugging with TraceKit Code Monitoring. Works with all backend SDKs. Use when the user asks to debug production code, set breakpoints, capture variable state, or enable code monitoring.
9tracekit-alerts
Set up alerting rules and notification channels in TraceKit for errors, performance degradation, and availability monitoring. Covers dashboard setup, API-based rules, Slack integration, and a starter kit of recommended alerts. Use when the user asks about alerts, notifications, error spikes, latency monitoring, or uptime.
8tracekit-browser-sdk
Sets up TraceKit APM in vanilla JavaScript/TypeScript applications for automatic error capture, breadcrumbs, performance monitoring, and distributed tracing. Use when the user has a plain HTML/JS, Web Components, or vanilla TypeScript project without a framework like React, Vue, or Angular.
8tracekit-react-sdk
Sets up TraceKit APM in React applications with error boundaries, component performance tracking, and distributed tracing. Use when the user asks to add TraceKit, add observability, instrument a React app, or configure APM in a React/TypeScript project.
8tracekit-session-replay
Set up TraceKit Session Replay to record and replay user sessions with linked distributed traces. Covers privacy settings, sampling rates, and GDPR compliance. Use when the user asks to record sessions, replay user interactions, or debug user-reported issues visually.
8tracekit-java-sdk
Sets up TraceKit APM in Java applications for automatic distributed tracing, error capture, and code monitoring. Supports Spring Boot and Micronaut frameworks with Maven and Gradle build systems. Includes LLM instrumentation via OkHttp interceptor for OpenAI and Anthropic API call monitoring. Use when the user asks to add TraceKit, add observability, instrument a Java service, or configure APM in a Java project.
8