Files
vscode/extensions
Ulugbek Abdullaev 878724842f nes: add fetchResult to enhanced telemetry to disambiguate empty model response vs missing model response (#321433)
* nes: add fetchResult to enhanced telemetry to disambiguate empty model responses

The restricted/enhanced 'copilot-nes/provideInlineEdit' event already carries 'modelResponse', but 'eventPropertiesToSimpleObject' drops falsy property values (including the empty string) before the event reaches the wire. That makes a successful but empty model response (e.g. the diff-patch model emitting "" to mean "no edit") indistinguishable from cancellations, fetch failures, and no-fetch paths in the copilot_v0_next_edit_suggestion_restricted_code_snippet table.

Add 'fetchResult' (the underlying ChatFetchResponseType, e.g. 'success' / 'canceled' / 'failed' / ...). Decode:

  fetchResult = 'success' AND modelResponse IS NULL  -> model responded with the empty string
  fetchResult = 'canceled' / 'failed' / ...          -> specific failure kind
  fetchResult IS NULL                                -> no fetch (e.g. cache hit; check isFromCache measurement)

The field reuses the existing 'fetchResult' vocabulary already documented in the standard event's GDPR catalog, so no new naming is introduced.

Refs https://github.com/microsoft/vscode-copilot-issues/issues/443

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* nes: address Copilot review feedback for fetchResult telemetry

Use the strongly-typed FetchResultWithStats.fetchResult value in enhanced telemetry and update tests to assert the on-wire payload via eventPropertiesToSimpleObject.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Sandeep Somavarapu <sasomava@microsoft.com>
2026-06-16 16:33:19 +05:00
..
2026-06-12 08:49:16 -07:00