Features
Monthly Session Caps
Limit how many sessions a project records each month with maxSessionsPerMonth or the dashboard cap, and what happens when a cap or plan limit is reached.
A session cap is a ceiling you set on one project: once it has started that many sessions in a calendar month, new sessions are refused until the month ends. It keeps a noisy staging site or an unexpected traffic spike from using up your organisation's allowance.
Two places to set it
anyreplay('init', {
projectKey: 'YOUR_PROJECT_KEY',
maxSessionsPerMonth: 10000,
});createRecorder({
projectKey: 'YOUR_PROJECT_KEY',
maxSessionsPerMonth: 10000,
});In the dashboard, open Projects, choose the cap next to a project and enter a number of sessions per month, or leave it empty for no cap. The projects list shows what each project has recorded this month next to its ceiling. The snippet on the setup page includes the project's cap when one is set, and a commented example line when it is not.
Both accept a whole number from 1 to 1,000,000. When both are set, the lower one wins. The snippet value is sent only with the first chunk of each new session; the dashboard value applies to every session regardless of which snippet is installed.
What happens at the cap
- A new session that would exceed the cap is refused with
402and the codesession_cap_reached. - Sessions already in progress keep recording until they end. A recording cut off halfway is worth less than the few chunks it would save.
- The recorder stops for that page and remembers the refusal in the tab for two minutes, so the next page load does not ask again straight away. The React Native recorder remembers it for two minutes across launches.
- The setup page explains that the project reached the cap you set, with a link to change it.
- The count resets at the start of the next calendar month in UTC.
Plan limits work the same way
Your plan meters the whole organisation on two counters: sessions started and hours recorded per month. The free plan allows 500 sessions and 250 hours a month. When either is used up, new sessions are refused with 402 quota_exceeded, whose details.limit says which meter ran out, and sessions in progress finish. Owners and admins are emailed at 50, 75, 90 and 100 percent of each meter. See ingest responses and pricing.
Cap or sample?
A cap records everyone until it is reached and then no one. Sampling records a steady share all month. Use sampling to shape volume and a cap as the backstop.
React Native
The React Native SDK has no maxSessionsPerMonth option. Set the cap on the project in the dashboard; ingest enforces it for mobile sessions exactly as for web sessions.