How to set a DSN rate limit in Sentry
Learn how to set a DSN rate limit in Sentry by capping the errors a client key accepts per time window, so a noisy project cannot flood your quota.

Quick answer
Open your project's Client Keys (DSN) page, click Configure on the key, then fill in the Count field under Rate Limits with the maximum number of errors to accept. Choose a Time Window, and click Save. Sentry then limits how many errors that key accepts within the window.
Steps at a glance
- Open Client Keys (DSN) in your project settings
- Click Configure on the key you want to limit
- Find Rate Limits on the Key Details page
- Enter a maximum error number in Count
- Set the Time Window for that count
- Click Save to apply the rate limit
Interactive demo
Summary
A DSN rate limit caps how many errors one client key accepts in a chosen time window. It protects your quota from a noisy release or a runaway loop, because extra events are dropped instead of processed.
Step-by-step guide
Step 1
Open Client Keys (DSN)
Open the settings for your project and look in the SDK Setup group of the secondary navigation. Click Client Keys (DSN) to see the keys that your project uses to send events.
Step 2
Click Configure on the key
Find the key you want to limit, here the one named Default. Click Configure next to it to open the Key Details page, which shows the key usage chart and its settings.
Step 3
Click the Count field
Scroll down to the Rate Limits section. Click Count and enter the maximum number of errors the key should accept. Below it, the Time Window slider sets the period that this count applies to, such as 1 minute.
Step 4
Save the rate limit
Check that Count and Time Window show the values you want, then click Save. The limit applies to events sent with this key from then on.
Why this matters
You shipped a release and one broken loop is sending thousands of identical errors. Setting a rate limit on the key keeps your quota safe and your issue feed readable, while the rest of your project keeps reporting normally.
Frequently asked questions
What does Time Window control?
Time Window is the period in which the Count limit applies. In this capture it was set to 1 minute, and the slider starts at None.
Does the rate limit apply to the whole project?
It is set on a single client key from the Key Details page, so it applies to events sent with that key.
Related guides
Continue with more step-by-step guides for getting work done.
How to find your DSN in SentryFind your Sentry DSN in three clicks: open your project, go to Client Keys (DSN) under SDK Setup, and copy the value into your SDK config.
How to enable spike protection in SentryTurn on spike protection in Sentry so a sudden burst of events cannot use up your quota. Open Settings, pick Spike Protection and switch the project toggle on.
How to add a dashboard widget in SentryLearn how to add a dashboard widget in Sentry: open a custom dashboard, build an Errors line chart, name it, and see it appear on the dashboard.
How to set up data scrubbing in SentryTurn on server-side data scrubbing in Sentry, apply default scrubbers, hide IP addresses, and add sensitive fields so private data never gets stored.
How to set up uptime monitoring in SentrySet up uptime monitoring in Sentry: create an Uptime monitor for a URL, choose a project and environment, name it, and confirm checks are running.
How to set up user feedback in SentrySet up user feedback in Sentry: open your project settings, choose Feedback, switch on crash report notifications, and preview the modal users see.
Create interactive demos like this one — free, no coding required.
Start for free →