# Getting started with Error Tracking - Docs

## Capture your first exception

To get started with [Error Tracking](/docs/error-tracking.md), the first step is to install the PostHog SDK to start capturing exception events within your application.

### Platforms

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/Android_robot_bec2fb7318.svg)Android](/docs/error-tracking/installation/android.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/docs/integrate/frameworks/angular.svg)Angular](/docs/error-tracking/installation/angular.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/elixir.svg)Elixir](/docs/error-tracking/installation/elixir.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/flutter.svg)Flutter](/docs/error-tracking/installation/flutter.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/go.svg)Go](/docs/error-tracking/installation/go.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/hono_9d80c0611c.svg)Hono](/docs/error-tracking/installation/hono.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/ios.svg)iOS](/docs/error-tracking/installation/ios.md)

-   [Manual](/docs/error-tracking/installation/manual.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/nestjs_logo_034b054f38.svg)NestJS](/docs/error-tracking/installation/nestjs.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/frameworks/nextjs.svg)Next.js](/docs/error-tracking/installation/nextjs.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/nodejs.svg)Node.js](/docs/error-tracking/installation/node.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/frameworks/nuxt.svg)Nuxt (v3.7 and above)](/docs/error-tracking/installation/nuxt.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/react.svg)React Native](/docs/error-tracking/installation/react-native.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/frameworks/nuxt.svg)Nuxt (v3.6 and below)](/docs/error-tracking/installation/nuxt-3-6.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/python.svg)Python](/docs/error-tracking/installation/python.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/react.svg)React](/docs/error-tracking/installation/react.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/rails_581d31c82d.svg)Ruby on Rails](/docs/error-tracking/installation/ruby-on-rails.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/ruby.svg)Ruby](/docs/error-tracking/installation/ruby.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/integrate/js.svg)Web](/docs/error-tracking/installation/web.md)

-   [![](https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/docs/integrate/frameworks/svelte.svg)SvelteKit](/docs/error-tracking/installation/svelte.md)

> **New to error tracking?** See [core concepts](/docs/error-tracking/issues-and-exceptions.md) for a primer on issues, exceptions, stack traces, and more.

### Auto and manual capture

Exception autocapture can be enabled for most platforms. When enabled, PostHog automatically captures `$exception` events whenever errors are thrown by the client or server application.

You can also call the capture method `posthog.captureException()` to manually send exceptions to PostHog with custom properties.

[Install PostHog SDK](/docs/error-tracking/installation.md)

## Get accurate stack traces

The second step is to upload source maps to get accurate, readable stack traces for your captured exceptions. This helps you quickly identify and debug issues by showing you the original code context where the error occurred.

![Stack traces example](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2025_01_30_at_09_48_09_63dd3c5241.png)![Stack traces example](https://res.cloudinary.com/dmukukwp6/image/upload/Screenshot_2025_01_30_at_09_48_39_1030eea240.png)

[Upload source maps](/docs/error-tracking/upload-source-maps.md)

## Monitor and resolve issues

Once you're capturing errors, the next step is to stay on top of issues. Exception events are grouped into issues for your team to manage based on event information, such as the exception type, message, and stack trace.

![Error tracking overview](https://res.cloudinary.com/dmukukwp6/image/upload/SCR_20250728_ryub_aa8398de10.png)![Error tracking overview](https://res.cloudinary.com/dmukukwp6/image/upload/SCR_20250728_rzmm_23fa3181c4.png)

Use the PostHog Error Tracking dashboard to:

-   Manage, resolve, and auto-assign issues to team members
-   Customize issue grouping with rules
-   Set up real-time alerts based on event triggers, filters, and trends
-   Integrate with Slack, Discord, Teams, or an HTTP webhook

[Learn about issues](/docs/error-tracking/issues.md)

## Debug with AI

Let AI investigate and debug errors for you.

Connect with the PostHog MCP server to enable autonomous debugging with AI agents. You can also copy our [premade AI prompts](/docs/error-tracking/fix-with-ai-prompts.md) which include full stack traces and curated instructions for the AI to follow.

[Explore AI features](/docs/error-tracking/debugging-with-mcp.md)

## Integrate customer data

Take advantage of PostHog's [customer infrastructure](/docs.md) features to help you move from application errors to product improvements.

### Session replay

See exactly what users did before and after the error with [session replays](/docs/session-replay.md).

### Product analytics

Use `$exception` events with [product analytics](/docs/product-analytics.md) to create trends, funnels, or retention insights to spot patterns and prioritize issues. You can also see exceptions by individual users in their event history log.

![Product analytics dashboards](https://res.cloudinary.com/dmukukwp6/image/upload/SCR_20250728_sgre_98426bdbdb.png)![Product analytics dashboards](https://res.cloudinary.com/dmukukwp6/image/upload/SCR_20250728_sgvz_a9af4766fe.png)

### Feature flags

Roll out or revert code updates with [feature flags](/docs/feature-flags.md) based on users who’ve hit specific exceptions.

![Feature flags taregting error cohorts](https://res.cloudinary.com/dmukukwp6/image/upload/SCR_20250728_sirw_4622f2f7d0.png)![Feature flags taregting error cohorts](https://res.cloudinary.com/dmukukwp6/image/upload/SCR_20250728_sivj_9e5d71bb69.png)

## Use for free

PostHog's Error Tracking is built to be cost-effective by default, with a generous free tier and transparent usage-based pricing. Since we don't charge per seat, more than 90% of companies use PostHog for free.

## TL;DR 💸

-   No credit card required to start
-   First 100K exceptions per month are free
-   Above 100k we have usage-based pricing at $0.000370/exception with discounts
-   Set billing limits to avoid surprise charges
-   See our [pricing page](/docs/error-tracking/pricing.md) for more up-to-date details

And if that's *still* not enough, we wrote a whole page on how to [cut costs](/docs/error-tracking/pricing.md).

---

That's it! You're ready to start integrating.

[Install Error Tracking](/docs/error-tracking/installation.md)

1/6

[**Capture your first exception** ***Required***](#quest-item-capture-your-first-exception)[**Get accurate stack traces** ***Required***](#quest-item-get-accurate-stack-traces)[**Monitor and resolve issues** ***Required***](#quest-item-monitor-and-resolve-issues)[**Debug with AI** ***Recommended***](#quest-item-debug-with-ai)[**Integrate customer data** ***Recommended***](#quest-item-integrate-customer-data)[**Use for free** ***Free 100k exceptions/mo***](#quest-item-use-for-free)

**Capture your first exception**

***Required***

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better