Benefits of Dynamic Sampling

Sampling is a way to manage your application's scale while ensuring you have the comprehensive data to manage the performance and health of your application. At low volumes, storing all your data is feasible and reasonable, but as your application scales, storing a raw copy of everything has diminishing returns. That’s where dynamic sampling comes in.

Dynamic sampling is better than using your SDK to control how much transaction data you send to Sentry. It's difficult to decide what an appropriate client-side sample rate would be, and this can change over time. Instead, we recommend you send us 100% of your data and let us manage the sampling. Here are the benefits.

Automatic Sampling for High Quality Data

If you're using our Dynamic Sampling feature, Sentry automatically applies intelligent dynamic sampling to your data at higher volumes. This allows you to scale up affordably without having to micromanage your SDK sampling configuration. We'll take care of picking valuable samples to retain on your behalf, while also giving you controls to express priorities that best fit your use case.

Our dynamic sampling works best when you send us as much data as you can. The more a complete picture of your application we have, the better decisions we make on your behalf to retain data and detect and create new issues. If feasible, send us 100% of your data (that is, set your tracesSampleRate in the SDK to 1.0). If you can't do so initially, the system will operate on what it can see and when you purchase more transaction volume we'll adapt automatically. As a bonus, your per-transaction pricing goes down accordingly.

Avoid Data Gaps

If you set too low a transaction sample rate in your SDK, you might end up with performance blind spots. Just because you don't see a problem, it doesn't mean it's not there. With a low sample rate and a recurring issue, eventually Sentry will see it, but the delay could have consequences.

With Dynamic Sampling, Sentry calculates accurate metrics, like p95 response time, on the full breadth of the data you send to us. A comprehensive view means that trending, monitoring, and alerting are more accurate and you can respond to changes in your application faster. Put simply, the more data you send us, the more accurate and up to date a picture you'll have of the overall performance of your application.

Sufficient Troubleshooting Data

Even as you sample your data, you want to be sure you have enough data for troubleshooting purposes. It doesn't make sense to store everything, but when there's a problem you need the details. Dynamic sampling automatically adjusts what data we store for troubleshooting and analysis based on recent releases, environment, and even omitting low value data like health checks. We also progressively decrease how much raw data is stored as your scale increases. You can be confident that the data you're getting will allow you to dig as deep as you need to fix problem areas in your application.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").