add-monitoring

Integrate Sentry error tracking and PostHog analytics with user identification in Next.js apps.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill add-monitoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-monitoring
Source: https://github.com/jnlanahan/Product-Agents-and-Skills/tree/main/skills/4-Build-Monitoring
Command: npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill add-monitoring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents production launches from going blind by ensuring both error monitoring (Sentry) and product analytics (PostHog) are fully configured, verified, and aligned to authenticated users.

Core Features & Use Cases

  • Wires a complete monitoring stack: Sets up Sentry for production errors and PostHog for product analytics, replay, funnels, and feature flags—together, not separately.
  • Guides account setup and env var configuration: Walks the user through DSN/API key/host collection, then verifies the required environment variables are present.
  • Verifies end-to-end event flow: Includes concrete Sentry and PostHog verification steps using test error and live event checks.
  • Ensures user attribution: Applies user identification in both tools after sign-in to make analytics actionable post-launch.

Quick Start

Use this skill when you need to add both error tracking and product analytics for a production launch.

Frequently Asked Questions about add-monitoring

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

FAQPage Schema
How do I set up Sentry and PostHog monitoring in a Next.js app before launching?

To add error tracking and product analytics, configure your Sentry DSN and PostHog API keys as environment variables, install the SDKs, wire user identification after sign-in, and validate data flow with test events.

What's the best way to configure user identification for Sentry error tracking and PostHog analytics?

Wire authenticated user identification into both Sentry and PostHog after sign-in to ensure production errors and product analytics events are correctly attributed to specific authenticated users.

Do I need separate environment variables for Sentry and PostHog in my web app?

Yes, you need separate environment variables. You must collect and verify the required Sentry DSN and PostHog API keys to ensure both error tracking and product analytics tools are correctly initialized.

Can I verify that my Sentry error tracking and PostHog analytics are working before deployment?

Yes, you can verify monitoring by triggering test errors and checking for live events in both platforms. This validates end-to-end event flow so your production launch does not go blind.

Does this Sentry and PostHog monitoring setup work for existing apps or only new launches?

This monitoring setup works for both new launches and existing apps. It applies to Next.js and similar web apps where teams must add or complete observability and authenticated user attribution.