Skip to content

ref(seer): Move Seer credit checks to a dedicated backend - #129598

Merged
volokluev merged 1 commit into
masterfrom
volo/seer-credit-backend
Nov 2, 2026
Merged

volokluev merged 1 commit into
masterfrom
volo/seer-credit-backend

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Seer credit checks go through quotas.backend.check_seer_credits (added in #129130). That means getsentry has to implement them in getsentry/quotas.py, which is already overloaded (review comment).

This PR adds a dedicated swappable backend, SENTRY_SEER_CREDIT, built the same way as SENTRY_PARTNERSHIPS:

  • sentry.seer_credit.SeerCredit is the default. Every check passes, which matches the current Quota.check_seer_credits default.
  • can_run_seer_operation now calls seer_credit.backend.check_seer_credits.
  • Quota.check_seer_credits is removed.

No user-facing change: credit checks are still behind organizations:seer-credit-checks, and every backend involved returns has_enough_credits=True.

Follow-up: getsentry/getsentry#22888 implements the backend in getsentry/seer_credit.py and sets SENTRY_SEER_CREDIT. Merge this PR first, then that one. In the gap, getsentry's SubscriptionQuota.check_seer_credits (from getsentry#22885) is no longer called, so the Seer wallet balance-lookup sample pauses until #22888 lands.

via volo.

--

View Session [Sentry]

Seer credit checks went through the quotas backend, which made getsentry
implement them in its already overloaded quotas module. Add a
SENTRY_SEER_CREDIT swappable backend, like SENTRY_PARTNERSHIPS, so getsentry
can implement credit checks in a module of their own.

Co-Authored-By: Volo Kluev <[email protected]>
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 2, 2026 22:50
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 2, 2026
@volokluev
volokluev merged commit 285c673 into master Nov 2, 2026
100 checks passed
@volokluev
volokluev deleted the volo/seer-credit-backend branch November 2, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants