Skip to content

Rename skillContentRead telemetry properties to use 'skill' prefix#311945

Merged
pwang347 merged 1 commit intomicrosoft:mainfrom
AbhitejJohn:aajohn/skill-content-read-telemetry-prefix
Apr 22, 2026
Merged

Rename skillContentRead telemetry properties to use 'skill' prefix#311945
pwang347 merged 1 commit intomicrosoft:mainfrom
AbhitejJohn:aajohn/skill-content-read-telemetry-prefix

Conversation

@AbhitejJohn
Copy link
Copy Markdown
Contributor

Summary

Renames telemetry properties in the skillContentRead event to add a skill prefix, aligning property names with the event name to reduce ambiguity in the collected data. This was suggested by folks on the data team.

Property Renames

GH telemetry event (sendGHTelemetryEvent)

Old New
extensionIdHash skillExtensionIdHash
extensionVersion skillExtensionVersion
contentHash skillContentHash

Enhanced GH + Internal MSFT events (plaintext props)

Old New
extensionId skillExtensionId
extensionVersion skillExtensionVersion
contentHash skillContentHash

Properties that already had the skill prefix (skillName, skillPath, skillStorage, skillNameHash) are unchanged.

Testing

  • Updated all relevant telemetry assertions to match the renamed properties
  • Aligned the copied workbench implementation and its tests in this repo

Copilot AI review requested due to automatic review settings April 22, 2026 16:54
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 updates skillContentRead telemetry property names to consistently use a skill* prefix (per data team guidance), and updates tests accordingly. It also adds a workbench-side SkillContentReadTelemetry implementation + test intended to mirror upstream behavior.

Changes:

  • Renamed skillContentRead GH telemetry properties in the Copilot readFile tool (extensionIdHashskillExtensionIdHash, etc.).
  • Updated Copilot extension tests to assert the renamed telemetry properties.
  • Added a workbench SkillContentReadTelemetry contribution and a corresponding unit test (currently not aligned with the repo’s ILanguageModelToolsService API).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/skillContentReadTelemetry.test.ts Adds tests for workbench skillContentRead telemetry using renamed skill* properties (but currently references non-existent tool service APIs/types).
src/vs/workbench/contrib/chat/browser/skillContentReadTelemetry.ts Adds workbench telemetry emission for skill content reads using renamed skill* properties (but currently references non-existent tool service APIs/types).
extensions/copilot/src/extension/tools/node/test/readFile.spec.tsx Updates assertions and test title strings to the renamed telemetry properties.
extensions/copilot/src/extension/tools/node/readFileTool.tsx Renames skillContentRead telemetry payload properties to the new skill*-prefixed names.

Copilot's findings

Comments suppressed due to low confidence (2)

src/vs/workbench/contrib/chat/browser/skillContentReadTelemetry.ts:35

  • ILanguageModelToolsService currently exposes onDidInvokeTool but does not have onDidCompleteToolInvocation, so this subscription won’t compile. Either switch to the existing event(s) and derive completion via the tool invocation/state model, or extend the service interface + implementation to add a completion event.
		this._register(toolsService.onDidCompleteToolInvocation(e => this._onToolCompleted(e)));
		this._register(this._promptsService.onDidChangeSkills(() => {

src/vs/workbench/contrib/chat/test/browser/skillContentReadTelemetry.test.ts:95

  • This test calls mockToolsService.fireOnDidCompleteToolInvocation(...), but MockLanguageModelToolsService in src/vs/workbench/contrib/chat/test/common/tools/mockLanguageModelToolsService.ts only provides fireOnDidInvokeTool and there is no completion event in ILanguageModelToolsService. Update the test to use the actual service API (or add the completion event + mock support as part of this PR).
	async function fireAndAwait(event: IToolCompletedEvent): Promise<void> {
		mockToolsService.fireOnDidCompleteToolInvocation(event);
		// Allow the fire-and-forget async telemetry to complete
		await new Promise<void>(resolve => setTimeout(resolve, 50));
  • Files reviewed: 4/4 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/contrib/chat/browser/skillContentReadTelemetry.ts Outdated
Comment thread src/vs/workbench/contrib/chat/test/browser/skillContentReadTelemetry.test.ts Outdated
@AbhitejJohn AbhitejJohn force-pushed the aajohn/skill-content-read-telemetry-prefix branch from 60c3b5b to 1144448 Compare April 22, 2026 17:07
@pwang347 pwang347 merged commit 487cc1b into microsoft:main Apr 22, 2026
40 of 41 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants