instrument-error-tracking

Instrument error tracking across platforms using PostHog.

58|5|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/PostHog/skills --skill instrument-error-tracking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instrument-error-tracking
Source: https://github.com/PostHog/skills/tree/main/skills/omnibus/instrument-error-tracking
Command: npx skills add https://github.com/PostHog/skills --skill instrument-error-tracking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add PostHog error tracking to capture and monitor exceptions. Use after implementing features or reviewing PRs to ensure errors are tracked with stack traces and source maps. Also handles initial PostHog SDK setup if not yet installed.

Core Features & Use Cases

  • Automatic exception autocapture across supported platforms (web, mobile, server-side)
  • Manual error capture points via captureException or platform equivalents
  • Source maps upload guidance to deminify stack traces
  • Real-world use: instrument errors in PR reviews, feature work, and production apps

Quick Start

Initialize and instrument error tracking in your project with minimal changes.

Frequently Asked Questions about instrument-error-tracking

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

FAQPage Schema
How do I set up PostHog error tracking to automatically capture exceptions in a React or Node.js app?

PostHog error tracking automatically captures exceptions by integrating the platform SDK reference, enabling exception autocapture, and configuring environment variables for your React or Node.js project. It handles initial SDK installation if needed, providing automatic exception monitoring across web and server-side platforms.

What is exception autocapture and how does it work with source maps for debugging?

Exception autocapture automatically detects and records unhandled errors across supported platforms, while source maps upload guidance deminifies stack traces to reveal original source code. This combination captures production errors with full context, enabling developers to monitor exceptions and review stack traces during feature work or PR reviews.

Does PostHog error tracking support backend platforms like Python, Ruby, and Go?

PostHog error tracking applies to frontend and backend apps across React, Next.js, Web, Node.js, Python, Ruby, and Go. It enables automatic exception capture and manual capture points via platform equivalents like captureException, supporting both web and server-side instrumentation.

Can I add manual error capture points alongside automatic exception autocapture?

Yes, you can add manual error capture points using captureException or platform equivalents alongside automatic exception autocapture. This allows targeted error tracking for specific code paths while automatic capture handles unhandled exceptions across your supported platforms.

What's the best way to deminify stack traces from production errors?

Upload source maps to PostHog to deminify stack traces from production errors. The Skill provides source maps upload guidance to transform minified production stack traces back to original source code, making it easier to debug exceptions captured through automatic or manual error tracking.

Why do I need to configure environment variables per project for error tracking?

Configuring environment variables per project ensures PostHog error tracking correctly attributes captured exceptions to the right project context. This per-project configuration is required during SDK integration to enable exception autocapture and manual capture points to function properly across your platforms.