Spike protection

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.

The spike protection feature enables Raygun to monitor your incoming error data and protects you from a sudden influx of errors that are significantly higher than your average error process rate in the past 24 hours.


Includes all errors Raygun receives from your application, before any inbound filters or permanently ignored errors have been applied.

Events that Raygun actually processed for your application after the removal of events that matched all inbound filters and permanently ignored error groups.

Example:

  • Your application sends 100 errors per minute to Raygun's API (your error send rate)
  • Based on your inbound filters and permanently ignored error groups, Raygun works out it needs to drop 60 events per minute
  • Therefore, Raygun needs to process 40 events per minute (your error process rate)

The error chart you see on the Crash Reporting dashboard is your error process rate.

Screenshot of the Crash Reporting dashboard, with a graph showing error counts over time and a list of errors.


Once you have enabled the feature, we use your average error process rate, that we record over a rolling 24-hour period, to determine when a spike is happening. We calculate the per-minute spike protection limit using the following calculation:

maximum (50, 5 x average per minute error process rate over the last 24 hours)

If your average per-minute error process rate is very low, we set a minimum rate of 50 errors per minute.

When you send errors at a rate exceeding the spike protection rate, we will reject any extra 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 only accept and process 250 of those errors, dropping the rest.

When your application experiences a spike in processed errors, we will protect you. However, if the increased error process rate continues, Raygun will gradually raise the spike protection limit, over a 24-hour period, to the point where all errors are processed again.


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.

Crash reporting statistics chart with spikes highlighted.

You would have received spike protection emails about these spikes in your dashboard


Spike protection can be enabled on each Raygun application that uses Crash Reporting when you have a usage-based plan that includes on demand events.

  1. In the side navigation, go to Settings under Crash Reporting.
  2. Check the option to Enable automatic rate limiting when a spike is detected.
  3. 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 each hour that your application error send rate hits the spike protection rate (e.g., your application is sending more data to Raygun than what spike protection is allowing).

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.


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:

  • 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
  • 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.