Skip to content

Conversation

@wenytang-ms
Copy link
Contributor

@wenytang-ms wenytang-ms commented Nov 11, 2025

  1. ensure each resolve event trigger one send info
  2. aggregate all telemetry data into one unified dataset

Copy link
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 refactors telemetry collection for Java context resolution to ensure each resolve event triggers exactly one telemetry event with aggregated data. Previously, telemetry was sent multiple times during a single resolution operation (once for dependencies, once for imports). Now all telemetry is consolidated and sent once at the end.

Key changes:

  • Centralized telemetry function that aggregates dependencies and imports data
  • Refactored helper functions to return diagnostic information instead of sending telemetry directly
  • Single telemetry event sent per resolution request with complete context information

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/copilot/utils.ts Renamed and enhanced telemetry function to accept aggregated data including dependency/import counts and empty reasons
src/copilot/copilotHelper.ts Modified helper functions to return IResolveResult objects with diagnostic info instead of sending telemetry directly; removed sendInfo import
src/copilot/contextProvider.ts Removed local telemetry function and replaced with centralized sendContextResolutionTelemetry calls that aggregate all resolution data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wenytang-ms wenytang-ms requested a review from chagong November 11, 2025 07:09
chagong
chagong previously approved these changes Nov 11, 2025
@wenytang-ms wenytang-ms merged commit bb01d02 into main Nov 11, 2025
4 of 6 checks passed
@wenytang-ms wenytang-ms deleted the wenyt/throttling branch November 11, 2025 08:01
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