Skip to content

Commit ca59824

Browse files
authored
fix: add opt-out flag (#194)
1 parent 4361d93 commit ca59824

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/common/1dsClientFactory.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,16 @@ const getAICore = async (key: string, vscodeAPI: typeof vscode, xhrOverride?: IX
4949

5050
appInsightsCore.initialize(coreConfig, []);
5151

52-
appInsightsCore.addTelemetryInitializer((envelope) => {
53-
// Only add this flag when `telemetry.internalTesting` is enabled
52+
appInsightsCore.addTelemetryInitializer((envelope: any) => {
53+
envelope["ext"] = envelope["ext"] ?? {};
54+
envelope["ext"]["web"] = envelope["ext"]["web"] ?? {};
55+
envelope["ext"]["web"]["consentDetails"] = '{"GPC_DataSharingOptIn":false}';
56+
57+
// Only add the remaining flags when `telemetry.internalTesting` is enabled
5458
if (!internalTesting) {
5559
return;
5660
}
57-
envelope["ext"] = envelope["ext"] ?? {};
61+
5862
envelope["ext"]["utc"] = envelope["ext"]["utc"] ?? {};
5963
// Sets it to be internal only based on Windows UTC flagging
6064
envelope["ext"]["utc"]["flags"] = 0x0000811ECD;

0 commit comments

Comments
 (0)