Skip to content

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

Draft
24anisha wants to merge 1 commit intomainfrom
anisha/request_tools_3p
Draft

adding request.options.tools event to 3p#314641
24anisha wants to merge 1 commit 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

Screenshot Changes

Base: a19e4415 Current: 34d9405b

Changed (12)

chat/input/chatInput/WithArtifacts/Light
Before After
before after
chat/input/chatInput/WithFileChanges/Light
Before After
before after
chat/input/chatInput/WithTodos/Light
Before After
before after
chat/input/chatInput/WithTodosAndFileChanges/Light
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Light
Before After
before after
chat/input/chatInput/Full/Dark
Before After
before after
chat/input/chatInput/Full/Light
Before After
before after
chat/chatQuestionCarousel/MultiSelectQuestion/Light
Before After
before after
chat/widget/chatWidget/SimpleQA/Light
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Dark
Before After
before after
chat/widget/chatWidget/MultiTurn/Light
Before After
before after

@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 on lines +1148 to +1153
if (request.tools) {
this._telemetryService.sendEnhancedGHTelemetryEvent('request.options.tools', {
headerRequestId: ourRequestId,
conversationId,
messagesJson: JSON.stringify(request.tools),
}, telemetryData.measurements);
Comment on lines +1148 to +1154
if (request.tools) {
this._telemetryService.sendEnhancedGHTelemetryEvent('request.options.tools', {
headerRequestId: ourRequestId,
conversationId,
messagesJson: JSON.stringify(request.tools),
}, telemetryData.measurements);
}
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.

2 participants