fix(observability): attribute outage refusals to caller, bucket, and probe count - #62
Merged
polylane[bot] merged 1 commit intoSep 19, 2026
Conversation
…probe count Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated by Polylane Autofix from the review of #60.
When Redis is unreachable the MCP surface refuses requests and the link prober stops probing, and the events those refusals produced could not be tied to a caller or a scope. The refusals now record the affected user, the rate-limit bucket, and the number of probes turned away, so an operator can see who an outage is affecting while it is happening.
Why this fix
While Redis is unreachable the MCP surface fails closed, so every affected caller gets an error and nothing is written. Those refusals were unattributable.
rate limit unavailable; rejecting requestcarried no fields at all, and the counter-failure warning below it carried the bucket and the error but no user. An operator looking at an outage therefore saw a count of refusals and could not tell which tokens were hit, whether one heavy caller dominated, or whether the write bucket was the one being refused. Both sites now carryuserIdandbucket, so "who is being refused right now, and on which scope" is answerable from the log stream while the outage is live.The link-probe refusals had the mirror gap: they named the user but not the probe count, so the amount of outbound fan-out the refusal prevented was invisible. Both refusal warnings now carry
amount, which separates a refusal that stopped a handful of probes from one that stopped a large fan-out.These are field additions to existing events: no new log sites, no level changes, no message changes, so nothing that currently clusters by message changes shape.
userId,bucket, andamountare plain values that the shared formatter does not redact, and no payload, URL, or credential is added.The refusals themselves remain the intended fail-closed policy; this change only makes them attributable. Any operator complaint that the outage is still visible is a Redis-health question rather than a code change here.
3 files changed (+12/-3)
app/mcp/route.ts: modified, +9/-3lib/collections/link-reachability.ts: modified, +2/-0lib/integrations/mcp/rate-limit.ts: modified, +1/-0Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.