Skip to content

chore(observability): remove temporary Sentry rate limiter - #80

Merged
amrtgaber merged 1 commit into
mainfrom
chore/remove-sentry-brake
Apr 19, 2026
Merged

chore(observability): remove temporary Sentry rate limiter#80
amrtgaber merged 1 commit into
mainfrom
chore/remove-sentry-brake

Conversation

@amrtgaber

Copy link
Copy Markdown
Contributor

Summary

The 2026-04-18 pool-exhaustion storm has subsided. Removing the emergency before_send rate limiter that was added in #77 to protect Sentry quota, so TooManyConnectionsError events are reported at full fidelity again and any future incidents are immediately visible.

Changes

  • app/observability/sentry.py: remove _rate_limit_pool_exhaustion, _contains_pool_exhaustion, the _POOL_ERR_* constants, the _pool_err_times/_pool_err_lock state, and the before_send kwarg. Unused time/deque/Lock/asyncpg.exceptions imports go with it.
  • tests/test_sentry_rate_limit.py: removed (tested the code being reverted).

Pool resilience changes in app/database.py (pool_pre_ping, pool_recycle) are kept — those are general-purpose hardening, not a brake.

Test plan

  • uv run ruff check . clean
  • uv run ruff format --check . clean
  • uv run pytest — 21/21 pass (7 fewer than before; the removed file accounts for them)

Closes #78

The pool-exhaustion storm from 2026-04-18 has subsided; restoring full
fidelity of TooManyConnectionsError reports so future incidents are
visible again.

Closes #78
@amrtgaber
amrtgaber merged commit c78a8ae into main Apr 19, 2026
2 checks passed
@amrtgaber
amrtgaber deleted the chore/remove-sentry-brake branch April 19, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(observability): remove temporary Sentry rate limiter for TooManyConnectionsError

1 participant