From ff6cd330c8bfa25852d501d0c01081b1c437a42a Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 14 Jan 2026 11:54:23 +0100 Subject: [PATCH] Add telemetry on the number of additional certificates --- src/vs/workbench/api/node/proxyResolver.ts | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/proxyResolver.ts b/src/vs/workbench/api/node/proxyResolver.ts index 4e81dd810ed..8ee357c7ee5 100644 --- a/src/vs/workbench/api/node/proxyResolver.ts +++ b/src/vs/workbench/api/node/proxyResolver.ts @@ -105,7 +105,14 @@ export function connectProxyResolver( extHostLogService.trace('ProxyResolver#loadAdditionalCertificates: Loading test certificates'); promises.push(Promise.resolve(https.globalAgent.testCertificates as string[])); } - return (await Promise.all(promises)).flat(); + const result = (await Promise.all(promises)).flat(); + mainThreadTelemetry.$publicLog2('additionalCertificates', { + count: result.length, + isRemote, + loadLocalCertificates, + useNodeSystemCerts, + }); + return result; }, env: process.env, }; @@ -257,6 +264,22 @@ function recordFetchFeatureUse(mainThreadTelemetry: MainThreadTelemetryShape, fe } } +type AdditionalCertificatesClassification = { + owner: 'chrmarti'; + comment: 'Tracks the number of additional certificates loaded for TLS connections'; + count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Number of additional certificates loaded' }; + isRemote: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether this is a remote extension host' }; + loadLocalCertificates: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether local certificates are loaded' }; + useNodeSystemCerts: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'Whether Node.js system certificates are used' }; +}; + +type AdditionalCertificatesEvent = { + count: number; + isRemote: boolean; + loadLocalCertificates: boolean; + useNodeSystemCerts: boolean; +}; + type ProxyResolveStatsClassification = { owner: 'chrmarti'; comment: 'Performance statistics for proxy resolution';