Skip to content

feat(automations): Default event automation runs to 10 per minute with a configurable window - #2237

Merged
dcramer merged 3 commits into
mainfrom
feat/event-automation-run-limit-per-minute
Oct 26, 2026
Merged

dcramer merged 3 commits into
mainfrom
feat/event-automation-run-limit-per-minute

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Change the default event automation run limit from 10 runs per rolling hour to 10 runs per rolling minute. Hosts can also set the window now, so an hourly cap is still possible.

10 per hour blocks busy automations that are working as intended too quickly. 10 per minute still catches a runaway trigger, such as an automation that fires on every message in a busy channel.

Before this change, the one-hour window was a hardcoded constant (EVENT_AUTOMATION_RUN_WINDOW_MS). A host could change the count but not the window.

New createApp limit

createApp({
  limits: {
    eventAutomationRunLimit: {
      maxRuns: 100,       // default 10
      windowMs: 3_600_000, // default 60_000
    },
  },
})

Both fields are optional, and each must be a positive integer.

Breaking: limits.maxEventAutomationRunsPerHour is removed (hard cutover). getsentry/junior-prod does not set it, so it needs no change.

The block reason now names the configured window, for example "10 runs per minute" or "100 runs per hour". The Sentry extra fields on the block event are now app.event_automation.max_runs and app.event_automation.run_window_ms.

Existing run lists in the state adapter stay compatible. Entries older than the configured window stop counting. The list TTL follows the window.

I updated the docs (concepts/automations.md, reference/config-and-env.md) and event-automations/README.md.

Checks

  • pnpm --filter @sentry/junior typecheck: passes.
  • vitest chat-config, app-model-config, and event-automation-blocking: all 84 tests pass.
  • event-automations.test.ts has one failure, delivers the current automation card and retains its reference in web history. It also fails on unmodified main.

via David Cramer.

--

View Junior Session [Sentry]

…r hour

Change the event automation run limit window from one hour to one minute.
The default cap stays at 10 runs, so a single automation can now start
10 runs per rolling minute.

Rename the createApp limit to maxEventAutomationRunsPerMinute (hard
cutover) so the name matches the window.

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 26, 2026 7:40pm UTC

Request Review

Replace maxEventAutomationRunsPerMinute with two createApp limits:
maxEventAutomationRuns (default 10) and eventAutomationRunWindowMs
(default 60000). Hosts that want an hourly cap can set the window to one
hour. The block reason names the configured window.

Co-Authored-By: David Cramer <david@sentry.io>
@sentry-junior sentry-junior Bot changed the title feat(automations): Cap event automation runs per minute instead of per hour feat(automations): Default event automation runs to 10 per minute with a configurable window Oct 26, 2026
Move the count and window into limits.eventAutomationRunLimit
({ maxRuns, windowMs }) so hosts see they are one setting.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer merged commit 3daab82 into main Oct 26, 2026
44 checks passed
@dcramer
dcramer deleted the feat/event-automation-run-limit-per-minute branch October 26, 2026 19:52

This branch was successfully deployed

1 active deployment
Preview – junior-docs — cf39ac03 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant