Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit d605d81

Browse files
pwang347Copilot
andauthored
Disable debug log aggregation by default (#4401)
* feature flag * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 49e1c1f commit d605d81

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,6 +3216,15 @@
32163216
"preview",
32173217
"onExp"
32183218
]
3219+
},
3220+
"github.copilot.agentDebugLog.enabled": {
3221+
"type": "boolean",
3222+
"default": false,
3223+
"markdownDescription": "%github.copilot.config.agentDebugLog.enabled%",
3224+
"tags": [
3225+
"preview",
3226+
"onExp"
3227+
]
32193228
}
32203229
}
32213230
},

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@
386386
"github.copilot.config.instantApply.shortContextLimit": "Token limit for short context instant apply.",
387387
"github.copilot.config.summarizeAgentConversationHistoryThreshold": "Threshold for compacting agent conversation history.",
388388
"github.copilot.config.agentHistorySummarizationMode": "Mode for agent history summarization.",
389+
"github.copilot.config.agentDebugLog.enabled": "When enabled, collect agent request information (tool calls, LLM requests, token usage, and errors) for viewing and troubleshooting in VS Code. Requires window reload to take effect.",
389390
"github.copilot.config.backgroundCompaction": "Enable background compaction of conversation history.",
390391
"github.copilot.config.agentHistorySummarizationWithPromptCache": "Use prompt caching for agent history summarization.",
391392
"github.copilot.config.agentHistorySummarizationForceGpt41": "Force GPT-4.1 for agent history summarization.",

src/extension/trajectory/vscode-node/otelChatDebugLogProvider.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as vscode from 'vscode';
7+
import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService';
78
import { ILogService } from '../../../platform/log/common/logService';
89
import { IOTelService, type ICompletedSpanData, type ISpanEventData } from '../../../platform/otel/common/otelService';
10+
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
911
import { Disposable } from '../../../util/vs/base/common/lifecycle';
1012
import { IExtensionContribution } from '../../common/contributions';
1113
import {
@@ -130,9 +132,15 @@ export class OTelChatDebugLogProviderContribution extends Disposable implements
130132
constructor(
131133
@IOTelService private readonly _otelService: IOTelService,
132134
@ILogService private readonly _logService: ILogService,
135+
@IConfigurationService private readonly _configurationService: IConfigurationService,
136+
@IExperimentationService private readonly _experimentationService: IExperimentationService,
133137
) {
134138
super();
135139

140+
if (!this._configurationService.getExperimentBasedConfig(ConfigKey.AgentDebugLogEnabled, this._experimentationService)) {
141+
return;
142+
}
143+
136144
// Listen for completed spans and bucket by session
137145
this._register(this._otelService.onDidCompleteSpan(span => {
138146
this._onSpanCompleted(span);

src/platform/configuration/common/configurationService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ export namespace ConfigKey {
919919
export const AutomaticRenameSuggestions = defineSetting('renameSuggestions.triggerAutomatically', ConfigType.Simple, true);
920920
export const TerminalToDebuggerEnabled = defineSetting('chat.copilotDebugCommand.enabled', ConfigType.Simple, true);
921921
export const CodeSearchAgentEnabled = defineSetting<boolean>('chat.codesearch.enabled', ConfigType.Simple, false);
922+
export const AgentDebugLogEnabled = defineSetting<boolean>('agentDebugLog.enabled', ConfigType.ExperimentBased, false);
922923
export const ClaudeAgentEnabled = defineSetting<boolean>('chat.claudeAgent.enabled', ConfigType.Simple, true);
923924
export const ClaudeAgentAllowDangerouslySkipPermissions = defineSetting<boolean>('chat.claudeAgent.allowDangerouslySkipPermissions', ConfigType.Simple, false);
924925
export const InlineEditsEnabled = defineSetting<boolean>('nextEditSuggestions.enabled', ConfigType.ExperimentBased, true);

0 commit comments

Comments
 (0)