sentry-nextjs-sdk

Configure Sentry error monitoring and tracing for Next.js apps.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/leonanpereirapinto/ai-utils --skill sentry-nextjs-sdk-leonanpereirapinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-nextjs-sdk
Source: https://github.com/leonanpereirapinto/ai-utils/tree/main/skills/typescript/sentry-nextjs-sdk
Command: npx skills add https://github.com/leonanpereirapinto/ai-utils --skill sentry-nextjs-sdk-leonanpereirapinto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Next.js projects often struggle to instrument and maintain consistent error monitoring, tracing, and observability across browser, server, and edge runtimes. This Skill provides a guided, integrated approach to configuring Sentry for Next.js, eliminating guesswork and ensuring production-ready instrumentation.

Core Features & Use Cases

  • End-to-end error monitoring across client, server, and edge environments.
  • Tracing and performance visibility for Next.js routes, server actions, and middleware.
  • Optional enhancements: session replay, logs, profiling, AI monitoring, and cron monitoring for maintenance windows.

Quick Start

Run the wizard to install and configure Sentry for your Next.js project.

Frequently Asked Questions about sentry-nextjs-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Sentry error monitoring for a Next.js app?

Set up Sentry error monitoring by configuring instrumentation files like instrumentation-client.ts, sentry.server.config.ts, and sentry.edge.config.ts across your Next.js app runtimes. You can run an integrated wizard or follow manual steps to establish end-to-end tracing and error tracking.

Does Sentry work with Next.js App Router and Edge runtime?

Yes, Sentry works with Next.js App Router and Edge runtime. It provides end-to-end error monitoring and tracing across browser, Node.js, and Edge environments, specifically covering server actions, middleware, and API routes.

Can I track Next.js server actions and middleware with Sentry?

Yes, you can track Next.js server actions and middleware with Sentry. The setup provides tracing and performance visibility across your routes and middleware, ensuring consistent observability within both App Router and Pages Router environments.

How do I upload source maps to Sentry for a Next.js project?

Upload source maps to Sentry for a Next.js project by using the setup wizard or following manual configuration steps. Uploading source maps ensures that your error tracing and monitoring stack traces are accurately deobfuscated for production debugging.

What optional monitoring features can I add to Sentry in Next.js?

Optional Sentry monitoring features for Next.js include session replay, logs, profiling, AI monitoring, and cron checks. Enabling these features provides enhanced observability for maintenance windows and deeper performance visibility.