sentry-nextjs-sdk

Configure the Sentry SDK for Next.js error monitoring and tracing.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/achmf/KostaHub --skill sentry-nextjs-sdk-achmf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-nextjs-sdk
Source: https://github.com/achmf/KostaHub/tree/main/.agents/skills/sentry-nextjs-sdk
Command: npx skills add https://github.com/achmf/KostaHub --skill sentry-nextjs-sdk-achmf

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill solves the complexity of configuring comprehensive observability in Next.js applications, ensuring that errors, performance bottlenecks, and AI-specific issues are captured across browser, server, and edge runtimes.

Core Features & Use Cases

  • Full-Stack Monitoring: Automatically instruments error tracking, request tracing, and session replays across all three Next.js runtimes.
  • AI Observability: Provides deep insights into LLM calls, token usage, and agent performance for OpenAI, Anthropic, and Vercel AI SDK integrations.
  • Use Case: Use this to standardize error monitoring and performance tracing in a production Next.js app, ensuring that server actions, edge middleware, and client-side navigation are all fully observable.

Quick Start

Invoke the sentry-nextjs-sdk skill to perform a full diagnostic scan of your current project and guide you through the recommended installation and configuration steps.

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

To set up Sentry error monitoring and distributed tracing in Next.js, you need to configure the Sentry SDK across Node.js server, Edge, and browser client-side runtimes. This requires integrating with Next.js build processes and managing environment variables for production-ready observability.

Does Sentry SDK support monitoring across all Next.js runtimes including Edge and client-side?

Yes, Sentry SDK supports multi-runtime environments in Next.js including Node.js server, Edge, and browser client-side. This ensures errors, performance bottlenecks, and AI-specific issues are captured across browser, server, and edge runtimes.

Can I monitor LLM calls and token usage for OpenAI and Anthropic in Next.js?

Yes, you can monitor LLM calls and token usage for OpenAI, Anthropic, and Vercel AI SDK integrations in Next.js. This AI observability provides deep insights into token usage and agent performance alongside standard error tracking.

What's the best way to standardize error tracking for Next.js server actions and edge middleware?

The best way to standardize error tracking for Next.js server actions and edge middleware is configuring a unified Sentry SDK setup. This ensures server actions, edge middleware, and client-side navigation are all fully observable with distributed tracing.

Do I need to manage environment variables for Sentry production observability in Next.js?

Yes, you need to manage environment variables for Sentry production observability in Next.js. Production-ready observability requires proper environment variable management alongside integration with Next.js build processes to instrument all runtimes.

Why are my Next.js performance bottlenecks not being captured across browser and server runtimes?

Next.js performance bottlenecks may not be captured if the Sentry SDK is not configured for multi-runtime environments. You must instrument error tracking, request tracing, and session replays across browser, server, and edge runtimes to capture all issues.