Commit 8bb4b90
ref(ratelimiter): Reduce redis socket timeout and emit metric on timeout (#7662)
## Summary
- Reduce the rate limiter Redis socket timeout from 0.5s to 0.1s to fail
faster when Redis is slow or unavailable
- Emit a new metric `ratelimiter_redis_timeout` when a Redis timeout
occurs, tagged with the function (`start_request` or `finish_request`)
where it happened
## Test plan
- [ ] Deploy to staging and monitor for `ratelimiter_redis_timeout`
metric
- [ ] Verify rate limiting continues to work when Redis is healthy
- [ ] Confirm requests are not blocked when Redis times out (existing
fail-open behavior preserved)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 19f99c1 commit 8bb4b90
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
485 | 495 | | |
486 | 496 | | |
487 | 497 | | |
| |||
543 | 553 | | |
544 | 554 | | |
545 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
546 | 562 | | |
547 | 563 | | |
548 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
0 commit comments