Refs: #336701, #336102
Complexity: 3
Authors: Ross Wollman (@rwoll)
Assigned to: Joaquín Ruales (@jruales)
This TPI ensures that enterprise-managed VS Code instances do not drop OTel from Chat when enterprise policy is updated on disk. Copilot Chat should restart its OTel service so the new policy takes effect.
This does not affect Agent Host. Ensure Local is selected in the harness picker while testing.
Set up
- Close other VS Code windows.
- Open user
settings.json and ensure you comment out any OTel related settings if you personally have them. (Most people don't.)
- Add
"chat.editor.localAgent.enabled": true to settings.json since this bug is about the Local harness and not Agent Host.
Test
-
Outside of vscode, start the mock OTel Collector server locally via node ./collector.js (see script in Appendix). When VS Code triggers requests to it, you will see something like:
POST /v1/logs: 4100 bytes (application/json)
POST /v1/metrics: 9374 bytes (application/json)
POST /v1/traces: 273817 bytes (application/json)
-
Open VS Code Editor, create a new conversation and select Local for the harness. Send hello and wait for Copilot to respond normally. You should not yet see any requests from the server logs.
-
Write the following Policy file to your OS's respective policy store:
{
"telemetry": {
"enabled": true,
"endpoint": "http://localhost:4318",
"protocol": "http/json"
}
}
- Windows:
%ProgramFiles%\GitHubCopilot\managed-settings.json
- Linux:
/etc/github-copilot/managed-settings.json
- macOS:
/Library/Application\ Support/GitHubCopilot/managed-settings.json
-
Observe the Extension Host briefly restart in VS Code automatically.
-
Send another message to Copilot Chat (ensuring you are still on Local harness).
-
Observe the mock OTel server log logging requests like POST /v1/logs: 4100 bytes (application/json).
Cleanup
Remove the managed settings json file based on your OS.
Appendix
collector.js
// collector.js
require('node:http').createServer((req, res) => {
let bytes = 0;
req.on('data', chunk => bytes += chunk.length);
req.on('end', () => {
const type = req.headers['content-type'] || 'application/x-protobuf';
console.log(`${req.method} ${req.url}: ${bytes} bytes (${type})`);
res.writeHead(200, { 'content-type': type });
res.end(type.includes('json') ? '{}' : undefined);
});
}).listen(4318, () => console.log('OTLP collector: http://localhost:4318'));
Refs: #336701, #336102
Complexity: 3
Authors: Ross Wollman (@rwoll)
Assigned to: Joaquín Ruales (@jruales)
This TPI ensures that enterprise-managed VS Code instances do not drop OTel from Chat when enterprise policy is updated on disk. Copilot Chat should restart its OTel service so the new policy takes effect.
This does not affect Agent Host. Ensure Local is selected in the harness picker while testing.
Set up
settings.jsonand ensure you comment out any OTel related settings if you personally have them. (Most people don't.)"chat.editor.localAgent.enabled": truetosettings.jsonsince this bug is about the Local harness and not Agent Host.Test
Outside of vscode, start the mock OTel Collector server locally via
node ./collector.js(see script in Appendix). When VS Code triggers requests to it, you will see something like:Open VS Code Editor, create a new conversation and select Local for the harness. Send hello and wait for Copilot to respond normally. You should not yet see any requests from the server logs.
Write the following Policy file to your OS's respective policy store:
{ "telemetry": { "enabled": true, "endpoint": "http://localhost:4318", "protocol": "http/json" } }%ProgramFiles%\GitHubCopilot\managed-settings.json/etc/github-copilot/managed-settings.json/Library/Application\ Support/GitHubCopilot/managed-settings.jsonObserve the Extension Host briefly restart in VS Code automatically.
Send another message to Copilot Chat (ensuring you are still on Local harness).
Observe the mock OTel server log logging requests like
POST /v1/logs: 4100 bytes (application/json).Cleanup
Remove the managed settings json file based on your OS.
Appendix
collector.js