---
title: "Dynamic Sampling"
description: "Learn how to prioritize important events and increase visibility in lower-volume projects with Dynamic Sampling."
url: https://docs.sentry.io/organization/dynamic-sampling/
---

# Dynamic Sampling

## [Overview](https://docs.sentry.io/organization/dynamic-sampling.md#overview)

While storing all your data makes sense at relatively low volumes, as your application scales, storing a raw copy of all your data has diminishing returns. When data reaches high volumes, Sentry begins to automatically prioritize retaining certain spans over others with server-side data retention strategies called Dynamic Sampling Priorities.

It's important to note that even when Sentry begins to only store the most valuable data based on Dynamic Sampling Priorities, the [performance metrics](https://docs.sentry.io/product/dashboards/sentry-dashboards.md) you see are still based on **all** the events you send to Sentry. This ensures that you get a full and complete view of your application's health.

Dynamic sampling only applies to spans and transactions, not errors.

## [Prerequisites](https://docs.sentry.io/organization/dynamic-sampling.md#prerequisites)

* [Admin-level permissions](https://docs.sentry.io/organization/membership.md).

* Latest version of one of the below SDKs:

  * Python: 1.7.2 or later
  * JavaScript: 7.6.0 or later
  * Apple: 7.23.0 or later
  * Android: 6.5.0 or later
  * React Native: 4.3.0 or later
  * Dart and Flutter: 6.11.0 or later
  * PHP: 3.9.0 or later
  * Laravel: 3.0.0 or later
  * Symfony: 4.4.0 or later
  * Ruby: 5.5.0 or later
  * Java: 6.5.0 or later
  * .NET: 3.22.0 or later
  * Go: 0.16.0 or later

## [Dynamic Sampling Priorities](https://docs.sentry.io/organization/dynamic-sampling.md#dynamic-sampling-priorities)

Below is a list of the strategies Dynamic Sampling employs to prioritize and deprioritize data. They are enabled by default, but can be updated on a per-project basis to better fit your organization's needs. To customize this behavior, go to Project Settings > Performance.

### [How to Change Dynamic Sampling Priorities](https://docs.sentry.io/organization/dynamic-sampling.md#how-to-change-dynamic-sampling-priorities)

To make changes to a project's dynamic sampling priorities in Sentry, go to **Settings > Projects**, select the project you're interested in, then scroll down to "Performance" in the "PROCESSING" section and make any updates under "DYNAMIC SAMPLING PRIORITIES" using the toggles. Each of your projects can have an individual set of dynamic sampling priorities.

### [Automatic Priorities](https://docs.sentry.io/organization/dynamic-sampling.md#automatic-priorities)

Sentry automatically prioritizes or deprioritizes based on the following rules:

#### [Latest Release](https://docs.sentry.io/organization/dynamic-sampling.md#latest-release)

Latest releases are a dynamic sampling priority because when you create a new release, we assume you'll want to have more visibility during the early adoption phase, which improves your ability to catch new issues as your release is gaining traction. Because you may want to deploy the same release in different environments, we'll also take your environment into account and prioritize those traces.

#### [Dev Environments](https://docs.sentry.io/organization/dynamic-sampling.md#dev-environments)

Since dev environments usually generate a small number of events as compared to prod environments, we prioritize them during your testing phase so you can get meaningful insights. We consider an environment to be a dev environment if its name matches one of the following glob patterns:

* `*debug*`
* `*dev*`
* `*local*`
* `*qa*`
* `*test*`

#### [Low Volume Projects](https://docs.sentry.io/organization/dynamic-sampling.md#low-volume-projects)

You won't be able to disable the Low Volume Projects dynamic sampling priority because it's set on an organization-wide level, not on a per-project basis.

Some projects within your organization are very high-volume compared to others. This means that low-volume projects might get drowned out if we treat all projects equally. To ensure that you have enough samples regardless of project scale, we prioritize low-volume projects.

#### [Low Volume Transactions](https://docs.sentry.io/organization/dynamic-sampling.md#low-volume-transactions)

Spans can be logically grouped by their transaction name within a project. This means that spans with the same transaction name most likely indicate the same operation or code path, while spans with different transaction names usually indicate different operations. We prioritize low-volume transactions for the same reason we prioritize low-volume projects: so they don't get drowned out by high-volume transactions. We want to make sure that low-volume code paths are sampled in enough quantities to generate a complete view of your application.

#### [Health Checks](https://docs.sentry.io/organization/dynamic-sampling.md#health-checks)

We deprioritize health check type transactions because while they're important for checking the stability of your application, they don't have any value beyond the task associated with them. We consider a transaction to be a health check if its name matches one of the following glob patterns:

* `*healthcheck*`
* `*heartbeat*`
* `*/health`
* `*/healthy`
* `*/healthz`
* `*/live`
* `*/livez`
* `*/ready`
* `*/readyz`
* `*/ping`

## [Deciding on Your SDK Sample Rate](https://docs.sentry.io/organization/dynamic-sampling.md#deciding-on-your-sdk-sample-rate)

To give Sentry the fullest, most accurate picture of your application's health, we recommend sending us 100% of your events. You can do this by setting your [tracesSampleRate](https://docs.sentry.io/platform-redirect.md?next=/performance/) to 1.0. If this isn't feasible for your organization, set a lower value, or switch to sampling selectively by using the [tracesSampler](https://docs.sentry.io/platform-redirect.md?next=/performance/) to filter your events based on contextual data. Note, that when calculating throughput, metering is based on received, not stored events.

Changes to your SDK sampling configuration may affect your quota. If you increase your SDK sampling rate, you'll also be increasing the volume of events you send to Sentry. This may require that you adjust your quota.
