Skip to content

Sentry quota exhausted  #7054

@n-lark

Description

@n-lark

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:

  1. tracesSampleRate: 0.5 in production is too high
  2. 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 ReplaysreplaysOnErrorSampleRate: 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Status

Closed / Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions