sentry-nextjs-sdk

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

23|5|Updated Apr 10, 2025
One-click install
npx skills add https://github.com/pubky/pubky-app --skill sentry-nextjs-sdk-pubky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-nextjs-sdk
Source: https://github.com/pubky/pubky-app/tree/main/.agents/skills/sentry-nextjs-sdk
Command: npx skills add https://github.com/pubky/pubky-app --skill sentry-nextjs-sdk-pubky

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill eliminates the complexity of manually configuring error monitoring, tracing, and performance profiling across the fragmented runtimes of a Next.js application.

Core Features & Use Cases

  • Multi-Runtime Coverage: Automatically configures Sentry for Browser, Node.js Server, and Edge runtimes.
  • Advanced Observability: Enables error monitoring, distributed tracing, session replay, and AI monitoring for LLM-based features.
  • Use Case: Use this skill to set up comprehensive monitoring for a Next.js 15 application, ensuring that server actions, edge middleware, and client-side navigation are all captured in a single, unified Sentry dashboard.

Quick Start

Invoke the sentry-nextjs-sdk skill to perform a full diagnostic scan of your project and guide you through the automated installation of the Sentry SDK.

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 and tracing in a Next.js application?

To set up Sentry error monitoring in Next.js, you need to install the @sentry/nextjs package and configure valid DSN credentials. This enables automated error tracking, distributed tracing, and performance profiling across your application runtimes.

Does Sentry Next.js SDK automatically configure observability for both App Router and Pages Router?

Yes, Sentry Next.js observability supports automated setup for both App Router and Pages Router. It configures error monitoring and tracing across browser, Node.js server, and edge runtimes to capture unified telemetry data.

Can I monitor edge middleware and server actions with Sentry in Next.js?

Yes, you can monitor edge middleware and server actions with Sentry in Next.js. The configuration provides multi-runtime coverage, ensuring that client-side navigation, edge processes, and server-side executions are captured in a unified dashboard.

What's the best way to configure distributed tracing across fragmented Next.js runtimes?

The best way to configure distributed tracing across fragmented Next.js runtimes is using an automated setup that targets browser, server, and edge environments. This eliminates manual configuration complexity and captures unified traces for your application.

Do I need valid Sentry DSN credentials to enable full observability in Next.js?

Yes, valid Sentry DSN credentials are required to enable full observability in Next.js. Alongside the @sentry/nextjs package, DSN credentials authenticate and route your error monitoring, session replay, and tracing data to your dashboard.

Why does my Next.js application need multi-runtime Sentry configuration for LLM features?

Next.js applications need multi-runtime Sentry configuration to capture telemetry across browser, server, and edge environments. This setup enables AI monitoring for LLM-based features and ensures comprehensive error tracking across fragmented runtimes.