MW-11193: Handle deprecated Copilot Metrics API - #114
Merged
Conversation
The GitHub Copilot metrics API endpoints are being shut down on April 2, 2026. Catch all exceptions from copilot_usage stream so the tap gracefully skips copilot metrics instead of crashing, regardless of what error GitHub returns after deprecation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
KBorders01
reviewed
Jun 29, 2026
KBorders01
left a comment
There was a problem hiding this comment.
Looks good. FYI @aaboyd it looks like you missed this one originally.
|
Looks good! |
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.
There's a follow on ticket to remove copilot code related to the deprecated enpoints.
This is just defensive to make sure that nothing blows up and give us time to do the other ticket at our convenience.
Summary
copilot_usagestream so the tap gracefully skips copilot metrics instead of crashing the entire sync/orgs/{org}/copilot/metricsand/orgs/{org}/team/{team_slug}/copilot/metrics) are being shut down on April 2, 2026except Exceptionused at both org-level and team-level to handle any error GitHub returns (410 Gone, 500, or otherwise)🤖 Generated with Claude Code