Skip to content

adding request.options.tools event to 3p#314641

Merged
24anisha merged 4 commits intomainfrom
anisha/request_tools_3p
May 6, 2026
Merged

adding request.options.tools event to 3p#314641
24anisha merged 4 commits intomainfrom
anisha/request_tools_3p

Conversation

@24anisha
Copy link
Copy Markdown
Contributor

@24anisha 24anisha commented May 6, 2026

Add the request.options.tools events to telemetry with the tool schema in the messages_json field.

Copilot AI review requested due to automatic review settings May 6, 2026 04:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Base: e1e6afed Current: dd769272

No screenshot changes.

@24anisha 24anisha marked this pull request as draft May 6, 2026 04:42
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

Adds a new enhanced telemetry event to capture the request.options.tools payload (tool schema) for Copilot chat requests, intended for third-party telemetry ingestion.

Changes:

  • Emit request.options.tools enhanced telemetry when request.tools is present (both websocket and HTTP request paths).
  • Include request correlation fields (headerRequestId, conversationId) and serialize the tools array into a JSON field.
Show a summary per file
File Description
extensions/copilot/src/extension/prompt/node/chatMLFetcher.ts Emits the new request.options.tools enhanced telemetry event in both websocket and HTTP request flows.

Copilot's findings

Comments suppressed due to low confidence (1)

extensions/copilot/src/extension/prompt/node/chatMLFetcher.ts:1433

  • Same as the websocket path: JSON.stringify(request.tools) can be large (tool schemas), but this enhanced telemetry call doesn’t multiplex/chunk properties, so it can get truncated/dropped. Please use multiplexProperties(...) (and/or chunking) for messagesJson. Also reconcile the messagesJson vs messages_json field naming with the schema referenced in the PR description.
		if (request.tools) {
			this._telemetryService.sendEnhancedGHTelemetryEvent('request.options.tools', {
				headerRequestId: ourRequestId,
				conversationId: telemetryProperties?.conversationId,
				messagesJson: JSON.stringify(request.tools),
			}, telemetryData.measurements);
  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread extensions/copilot/src/extension/prompt/node/chatMLFetcher.ts Outdated
Comment thread extensions/copilot/src/extension/prompt/node/chatMLFetcher.ts
@24anisha 24anisha requested a review from digitarald May 6, 2026 17:07
@24anisha 24anisha enabled auto-merge May 6, 2026 17:25
@24anisha 24anisha merged commit a906972 into main May 6, 2026
26 checks passed
@24anisha 24anisha deleted the anisha/request_tools_3p branch May 6, 2026 23:20
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 6, 2026
@digitarald digitarald added the telemetry Telemetry system issues label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

telemetry Telemetry system issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants