diff --git a/extensions/ql-vscode/src/common/vscode/telemetry.ts b/extensions/ql-vscode/src/common/vscode/telemetry.ts index ebad18a88..3ab30059b 100644 --- a/extensions/ql-vscode/src/common/vscode/telemetry.ts +++ b/extensions/ql-vscode/src/common/vscode/telemetry.ts @@ -128,7 +128,8 @@ export class ExtensionTelemetryListener ); this.push(this.reporter); - const client = (this.reporter as any).appInsightsClient as TelemetryClient; + // The appInsightsClient field is private but we want to access it anyway + const client = this.reporter["appInsightsClient"] as TelemetryClient; if (client) { // add a telemetry processor to delete unwanted properties client.addTelemetryProcessor((envelope: any) => {