Skip to content

Add telemtry for get pull request failures#8680

Open
alexr00 wants to merge 2 commits intomainfrom
alexr00/registered-ermine
Open

Add telemtry for get pull request failures#8680
alexr00 wants to merge 2 commits intomainfrom
alexr00/registered-ermine

Conversation

@alexr00
Copy link
Copy Markdown
Member

@alexr00 alexr00 commented Apr 20, 2026

No description provided.

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 14:19
@alexr00 alexr00 self-assigned this Apr 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds failure telemetry around fetching pull requests, aiming to diagnose when a PR lookup fails (including whether the same PR number succeeded in another repo) and to attribute failures to a specific call site.

Changes:

  • Updated GitHubRepository.getPullRequest to require a callerName and emit a pr.getPullRequestFailed telemetry event on errors.
  • Updated call sites across the extension to pass a stable callerName string when fetching PRs.
  • Refactored PR category search fetching to use GitHubRepository.getPullRequest rather than issuing an inline GraphQL query.
Show a summary per file
File Description
src/view/pullRequestCommentController.ts Passes a caller identifier when refreshing a PR after a reply-thread error.
src/lm/tools/activePullRequestTool.ts Passes a caller identifier when refreshing active PR data.
src/issues/userCompletionProvider.ts Passes a caller identifier for PR fetches used to drive completion data.
src/github/pullRequestModel.ts Passes a caller identifier for PR fetches used during approve head-sha validation.
src/github/overviewRestorer.ts Passes a caller identifier when restoring a PR overview webview.
src/github/issueModel.ts Passes a caller identifier for background PR prefetches triggered by cross-references.
src/github/githubRepository.ts Adds callerName parameter, success-tracking, and failure telemetry for PR fetches.
src/github/folderRepositoryManager.ts Updates PR fetch call sites and refactors category search to reuse getPullRequest.

Copilot's findings

  • Files reviewed: 8/8 changed files
  • Comments generated: 3

Comment thread src/github/githubRepository.ts
Comment thread src/github/folderRepositoryManager.ts Outdated
Comment thread src/github/githubRepository.ts
Co-authored-by: Copilot <copilot@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants