The spike protection feature enables Raygun to monitor your incoming error volumes and protects you temporarily from a sudden influx of errors that significantly exceed your average error processing rate in the past 24 hours.
note: When you have received an email notification about a spike occurring, please take the recommended actions to avoid the spike continuing, as you may incur additional usage charges.
Spike protection is a feature that is available and automatically enabled for our usage-based Crash Reporting plan. If you are on a different Crash Reporting plan but would like to use this feature, then please get in touch.
Error send rate
Includes all errors Raygun receives from your application, before any inbound filters or permanently ignored errors have been applied.
Error process rate
Events that Raygun actually processed for your application after the removal of events that matched all inbound filters and permanently ignored error groups.
- Your application sends 100 errors per minute to Raygun's API before inbound filters and permanently ignored error groups are applied. This is your error send rate.
- Of the 100, Raygun will drop 60 errors that match inbound filters or permanently ignored error groups.
- Raygun then processes 40 qualifying events per minute. This is your error process rate.
The error chart you see on the Crash Reporting dashboard is your error process rate.
How it works
We use your average error process rate over the past 24 hours to determine your spike protection errors per minute limit, and detect when a spike occurs. We use the following calculation:
maximum (50, 5 x average per minute error process rate over the past 24 hours)
If your average per-minute error process rate is very low, we set a minimum rate of 50 errors per minute.
When your errors exceed the spike protection rate, we will reject any further errors for the remainder of the current minute. The limit is applied per minute to ensure some data continues to trickle in throughout the spike. For example, if your average process rate is around 50 errors/min, and you start sending in 500 errors/min for us to process, we will accept and process 250 of those errors, dropping the rest.
Please note that since the rate limit is calculated using your error process rate over the past 24 hours. If a spike continues over a long period, the spike protection limit will gradually adjust to the new error process rate. This will continue to the point where all errors are processed again.
Correlating spike protection with the error chart
Since spike protection is triggered by spikes in the errors that we process for your applications, you will be able to correlate the spikes directly by looking at the spikes in your Crash Reporting error chart.
You would have received spike protection emails about these spikes in your dashboard
Enabling spike protection
Spike protection is enabled by default on each of your applications within Crash Reporting when you have a usage-based plan that includes on demand events. To enable or disable it you can follow these steps:
- In the side navigation, go to Settings under Crash Reporting.
- Check the option to Enable automatic rate limiting when a spike is detected.
- Save changes to apply the setting.
Note that spike protection will take a few minutes to become active and will start learning your application's average per minute error rate over the next 24 hours.
We'll notify you when a spike begins and continue to send a notification every 2 hours while the spike remains in progress.
If you find spike protection emails too noisy, you can turn off the spike protection email but still have the feature enabled.
You can learn more about how to adjust the notifications for spike protection in our Notifications documentation.
Plan owners can not turn off spike protection email notifications. As the owner of the account it is important that you are aware of spikes that may impact your usage billing.
What actions should I take when I receive a spike protection email?
Raygun has a usage-based billing model, this means we bill by the number of errors that we process. Spike protection gives you a strong indication that you are sending more errors for us to process than your 24-hour average and therefore you may also incur additional usage charges.
Here are the steps you can take to bring your error spikes under control:
- Do not turn spike protection off, the built in rate limiting will help limit your error volumes
- Identify and fix the error(s) responsible for the spike by reviewing your Crash Reporting error dashboard for spikes in error volume
- Permanently ignore errors caused by 3rd party plugins/libraries
- Use inbound filters to prevent irrelevant errors from being sent to Raygun
- Use the OnBeforeSend method to inspect the error before it is sent and determine whether or not it should be sent
- Keep an eye out for further spike protection notifications in your inbox, so that you can take the above actions quickly
If you do not take action, and your spike continues, you may incur additional usage charges based on your subscription. See our billing docs for details.