Error Tracking pricing

PostHog Error Tracking comes with a generous free tier and transparent, usage-based pricing. Our large free tier means more than 90% of companies use PostHog for free.

No credit card is required to get started. You can also set billing limits to avoid any surprise charges.

Error Tracking is billed by the number of $exception events you capture. The price per event changes based on your usage. You can estimate your costs using our pricing calculator below or by visiting our pricing page for a more detailed breakdown.

100,000
exceptions/month

$0

100k1M10M50M

We aim to be significantly cheaper than our competitors. Below are tips to reduce your error tracking costs.

What contributes to your bill?

Error tracking bills you based on the number of $exception events ingested by PostHog each month. This means if you send exception events to PostHog, they will be billed (events dropped before ingestion are not billed).

This also means:

  • The total number of exceptions stored in PostHog does not contribute to your bill.
  • The number of issues in PostHog does not affect your bill, only the individual exception events that make up the issues.
  • Merging and resolving issues in PostHog do not reduce your bill.
  • Suppressing an issue only affects future matching exceptions. Once an issue is suppressed, future exceptions linked to that issue are not ingested or billed. Exceptions already ingested before suppression still count.
  • Suppression rules also apply to future exceptions. Matching exceptions are dropped before ingestion and are not billed.

Prevent surprises with billing limits

Like all PostHog products, you can set a billing limit for error tracking. When a project exceeds this limit, PostHog will no longer capture exception events until your billing period resets.

Tips to reduce your bill

The best way to reduce your bill is to reduce the number of $exception events you send to PostHog from the client-side. This means being more selective about which exceptions are captured.

Configure exception autocapture

By default, we capture all unhandled errors and rejections. This can capture more than you need. To reduce which exceptions that are captured, you can configure which types of exceptions are autocaptured in the JS SDK config like this:

JSON
{
"capture_exceptions": {
"capture_unhandled_errors": true,
"capture_unhandled_rejections": true,
"capture_console_errors": false
}
}

Alternatively, you can disable exception autocapture completely in your project settings.

Suppression rules

Suppression rules drop matching future exceptions before they are ingested as $exception events, so they can reduce your bill. Supported SDKs may apply rules client-side before sending exceptions to PostHog, and PostHog also applies them server-side before storing the event. They do not apply retroactively to exceptions already ingested. You can only filter based on the exception type and message attributes because the stack of an exception may still be minified client-side.

Issue suppression rules

Burst protection

The JavaScript web SDK uses burst protection to limit the number of autocaptured exceptions that can be captured in a period. This prevents an excessive amount of exceptions being captured from any one client, typically because they're being thrown in an infinite loop.

By default, we capture 10 exceptions (bucket size) of the same type within a 10 second period before the rate limiter kicks in, after which, we capture 1 exception (refill rate) every 10 seconds.

Often not needed, but you can change the bucket size and refill rate as part of your configuration:

JavaScript
import posthog from 'posthog-js'
posthog.init('<ph_project_token>', {
api_host: 'https://us.i.posthog.com',
error_tracking: {
__exceptionRateLimiterRefillRate: 1
__exceptionRateLimiterBucketSize: 10
}
})

Using the before_send hook

You can use the before_send callback in the web, Node.js, and React Native SDKs to exclude any exception events you do not wish to capture. Do this by providing a before_send function when initializing PostHog and have it return a falsey value for any events you want to drop.

posthog.init('<ph_project_token>', {
before_send: (event) => {
if (event.event === "$exception") {
const exceptionList = event.properties["$exception_list"] || []
const exception = exceptionList.length > 0 ? exceptionList[0] : null;
if (exception && exception["$exception_type"] === "UnwantedError") {
return false
}
}
return event
}
})

Community questions

Was this page useful?

Questions about this page? or post a community question.