fix(sentry): Exclude peer anomalies from shutdown summary level escalation#302
Merged
cameroncooke merged 1 commit intomainfrom Mar 31, 2026
Merged
fix(sentry): Exclude peer anomalies from shutdown summary level escalation#302cameroncooke merged 1 commit intomainfrom
cameroncooke merged 1 commit intomainfrom
Conversation
…ation Peer anomalies (peer-count-high, peer-age-high) are environmental observations common in multi-client setups, not indicators of a problem with the shutting-down process. Exclude them from the level escalation logic so normal shutdowns emit at info instead of warning. Peer anomaly data is still captured in the event snapshot extra data and tracked independently via recordMcpLifecycleAnomalyMetric. Only process-local anomalies (high-rss, long-lived-high-rss) and cleanup failures now escalate to warning. Fixes XCODEBUILDMCP-Z Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
commit: |
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.
Exclude peer anomalies (
peer-count-high,peer-age-high) from the levelescalation logic in
captureMcpShutdownSummary. These are environmentalobservations common in multi-client setups (multiple MCP hosts connecting
simultaneously), not indicators of a problem with the shutting-down process
itself.
Previously, any anomaly elevated the shutdown summary event to
warninglevel. With
PEER_COUNT_HIGH_THRESHOLD = 2and multiple MCP clients beingstandard, nearly every
stdin-endshutdown was emitted as a warning --generating ~484k Sentry events on XCODEBUILDMCP-Z since March 16.
Now only process-local anomalies (
high-rss,long-lived-high-rss) andcleanup failures escalate to
warning. Normal shutdowns with only peeranomalies emit at
infolevel. Peer anomaly data is still:recordMcpLifecycleAnomalyMetricFixes XCODEBUILDMCP-Z