Webinar: Continuous Code Improvement Series | How to Improve with AI-Assisted Workflows Register Here Today!
September 25th, 2020 • By Gabriella Papp
At Rollbar, we offer different plans, with varying volumes of events included. Most likely, you chose the one you thought fit your needs the best. However, bugs can happen, and an unexpected amount of events can start to pour in on your projects. Running over your event limits is no fun, especially when you are trying to work on quickly and efficiently fixing issues. Exceeding your plan limit can result in extra costs or missing information on bug occurrences that can seriously affect your business and ruin the end-user experience for your customers.
We offer some easy tips to make sure you avoid on-demand events and bring the most out of using Rollbar. Keep an eye on how many occurrences are saved and processed for your projects to gain control over how many events count towards your monthly billing.
In this article, we will cover:
So let's get started!
Access Token Rate Limiting
Access tokens are used to read and write data via the Rollbar API. Each token has a set of scopes that determine which operations can be performed with the token. There are project access tokens available from the project settings and account access tokens available from the account Settings.
You can impose a rate limit on your project access token to set a cap on the number of occurrences you log in a specified time frame. The default rate limit per access token is 5,000 calls (or occurrences) per 1 minute, which can be modified to any number of calls in any time frame up to 1 month. What happens when the cap is reached? We will drop all occurrences until the rate limit window resets. It is essential to know that the rate limit window does not start at an exact time every day; it starts whenever the first occurrence is logged for that time frame.
Here is a practical example:
So to sum up, the window may not always be at the same time every day, as it depends on the time the limit is reached and the 'first' call occurring after the rate limit window resets.
Another important thing to note is that if you use up all of your occurrences at the beginning of your rate limit window, you won't log anything until the next rate limit window is reset.
Disable On-Demand Events
If you are on a strict budget and don't mind missing some errors, then you can choose to disable on-demand events in Account Settings -> Billing info. If on-demand events are disabled and you reach your plan limit, we will not process new errors until your next billing cycle begins. This will prevent you from having to pay for on-demand events.
Please note: Similar to the issue with Access Token Rate Limiting, if you use up your occurrence quota early in the month, you will not log any additional occurrences for the rest of the month. If on-demand events are regular for your project, it might be economical to consider upgrading to a different monthly or annual plan.
Enable High Occurrence Rate Notifications
Most of the time, you can avoid running over your limits by setting up the appropriate notification channels that can alert you before you exceed your rate limits.
Good to know: Currently, this is only available for Email and Slack notification rules. Also, it is worth noting that this only informs you when a single item has a high occurrence rate. There isn't currently a way to notify you if your access token has a high occurrence rate.
Want to learn more?
Check out our docs on Rate limits and learn how to configure them.