# Error Tracking pricing - Docs

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](/pricing.md) for a more detailed breakdown.

100,000exceptions/month

$0

100k1M10M50M

#### Allocation

#### Price

#### Your selection

#### Subtotal

##### First 100k exceptions

##### **$0.000000**/exception

100,000

$0

##### 100-325k

##### **$0.000370**/exception

0

$0

##### 325-10 million

##### **$0.000140**/exception

0

$0

##### 10 million+

##### **$0.000115**/exception

0

$0

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.

This also means:

-   The total number of exceptions stored in PostHog does not contribute to your bill.
-   The number of [issues](/docs/error-tracking/issues-and-exceptions.md) in PostHog does not affect your bill, only the individual exception events that make up the issues.
-   Merging, resolving, and suppressing issues in PostHog does not reduce your bill.

## Prevent surprises with billing limits

Like all PostHog products, you can set a [billing limit](https://us.posthog.com/organization/billing) 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

PostHog AI

```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](https://app.posthog.com/error_tracking?activeTab=configuration#selectedSetting=error-tracking-exception-autocapture).

### Suppression rules

Autocaptured exceptions can be ignored client-side by [configuring suppression rules](https://app.posthog.com/error_tracking?activeTab=configuration#selectedSetting=error-tracking-suppression-rules) in PostHog settings. 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](https://res.cloudinary.com/dmukukwp6/image/upload/suppression_rule_light_8db44eb6b1.png)![Issue suppression rules](https://res.cloudinary.com/dmukukwp6/image/upload/suppression_rule_dark_5972d57398.png)

### 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

PostHog AI

```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](/docs/libraries/js.md), [Node.js](/docs/libraries/node.md), and [React Native](/docs/libraries/react-native.md) 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 AI

### Web

```javascript
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
    }
})
```

### React

```jsx
const posthog = new PostHog('<ph_project_token>', {
    host: 'https://us.i.posthog.com',
    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 null
            }
        }
        return event
    },
})
```

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better