Sentry quota exhausted within first week of billing cycle
Summary
Sentry Stats & Usage (14-day window, flowfuse-frontend) shows two categories burning through quota:
| Category |
Total (14d) |
Accepted |
Rate Limited |
| Spans |
497.5K |
173.4K |
318.9K |
| Session Replays |
2.9K |
0 |
2.9K |
Config lives in frontend/src/services/error-tracking.js.
Root Cause
Spans — two compounding issues:
tracesSampleRate: 0.5 in production is too high
Brokers/index.vue polls GET /api/v1/teams/:id/brokers/:id every 5s. A user with the page open for a workday generates ~3,000 spans from this endpoint alone
Session Replays — replaysOnErrorSampleRate: 0.25 fires on every error hit and is the primary driver (~200 replays/day)
Fix
Spans — reduce sample rate + exclude broker polling:
tracesSampleRate: window.sentryConfig.production ? 0.05 : 0.5,
new BrowserTracing({
routingInstrumentation: vueRouterInstrumentation(router),
shouldCreateSpanForRequest: (url) => {
if (/\/brokers\/[^/]+$/.test(url)) return false
return true
}
})
Session Replays — reduce error-linked replay rate:
replaysSessionSampleRate: window.sentryConfig.production ? 0.01 : 0.1,
replaysOnErrorSampleRate: 0.1,
Expected Impact
| Category |
Current |
After fix |
| Spans |
~35K/day |
~1.75K/day |
| Session Replays |
~200/day |
~20/day |
Notes
- Errors (351 accepted / 14d) are fine, no changes needed
- We use PostHog for session recording — Sentry replays are only valuable when tied to an error, so keeping
replaysOnErrorSampleRate at 0.1 rather than 0 preserves that value
Sentry quota exhausted within first week of billing cycle
Summary
Sentry Stats & Usage (14-day window,
flowfuse-frontend) shows two categories burning through quota:Config lives in
frontend/src/services/error-tracking.js.Root Cause
Spans — two compounding issues:
tracesSampleRate: 0.5in production is too highBrokers/index.vuepollsGET /api/v1/teams/:id/brokers/:idevery 5s. A user with the page open for a workday generates ~3,000 spans from this endpoint aloneSession Replays —
replaysOnErrorSampleRate: 0.25fires on every error hit and is the primary driver (~200 replays/day)Fix
Spans — reduce sample rate + exclude broker polling:
Session Replays — reduce error-linked replay rate:
Expected Impact
Notes
replaysOnErrorSampleRateat0.1rather than0preserves that value