sentry-nextjs-sdk

Configure the Sentry SDK for Next.js App Router, Pages Router, and Edge runtime deployments.

18|Updated Jul 23, 2025
One-click install
npx skills add https://github.com/faw01/create-mf2-app --skill sentry-nextjs-sdk-faw01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-nextjs-sdk
Source: https://github.com/faw01/create-mf2-app/tree/main/apps/cli/template/.agents/skills/sentry-nextjs-sdk
Command: npx skills add https://github.com/faw01/create-mf2-app --skill sentry-nextjs-sdk-faw01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @sentry/nextjs, and includes references (resource) components.

What problem does it solve?

This skill solves the complexity of manually configuring error monitoring, performance tracing, and session replay across the fragmented runtimes of a modern Next.js application.

Core Features & Use Cases

  • Multi-Runtime Coverage: Automatically configures Sentry for Browser, Node.js Server, and Edge runtimes.
  • Advanced Observability: Enables AI monitoring, Cron job tracking, and structured logging integration.
  • Use Case: Use this when you need to set up production-ready error tracking that captures server actions, edge middleware errors, and client-side navigation spans in a Next.js 13+ project.

Quick Start

Invoke the sentry-nextjs-sdk skill to perform a full diagnostic scan of your current project and guide you through the automated setup process.

Frequently Asked Questions about sentry-nextjs-sdk

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

FAQPage Schema
How do I configure Sentry error monitoring for a Next.js application using both App Router and Pages Router?

Configuring Sentry error monitoring for Next.js involves setting up the SDK to handle both App Router and Pages Router environments. This skill automates that setup by implementing instrumentation hooks and source map uploads to ensure full observability across all execution contexts.

Can I track edge middleware errors and client-side navigation spans in Next.js with Sentry?

Yes, you can track edge middleware errors and client-side navigation spans in Next.js with Sentry. The configuration provides multi-runtime coverage, automatically enabling error monitoring and distributed tracing for Browser, Node.js Server, and Edge runtimes.

What is the best way to set up distributed tracing and session replay in a Next.js 13+ project?

The best way to set up distributed tracing and session replay in a Next.js 13+ project is to use a professional-grade Sentry configuration. It captures server actions, edge middleware errors, and client-side spans to provide comprehensive observability.

Does Sentry SDK support source map uploads for Next.js production builds?

Yes, the Sentry SDK supports source map uploads for Next.js production builds. Implementing source map uploads ensures that errors are accurately mapped back to your original source code across all server and client execution contexts.

How do I enable AI monitoring and Cron job tracking in my Next.js observability setup?

To enable AI monitoring and Cron job tracking in your Next.js observability setup, you configure the Sentry SDK with advanced observability features. This includes structured logging integration alongside comprehensive error monitoring and distributed tracing.