cloudflare / cloudflare/agentic-inbox

Log rate-limit hits for observability

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.5k
Forks
964
PR merge metrics
No merged PRs in 30d

Description

Rate-limit checks return 429 with no log, so we have no signal in production for whether limits are firing, who is hitting them, or whether thresholds need tuning.

### Sites
- [workers/index.ts:261](workers/index.ts#L261)
- [workers/lib/tools.ts:409](workers/lib/tools.ts#L409)

### Proposal
Before the 429 response, emit one structured log line with: limit name, mailbox/principal id, current count, limit, and timestamp. Keep the response shape unchanged.

### Why
Rate-limit hits are an abuse/incident signal. Without a log we can't answer \"is the limit too tight?\" or \"is something looping?\" from the dashboard.

### Effort
~5 lines per site.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.