Skip to content

Commit 9396163

Browse files
Use correct type for envelope argument
1 parent bfe78eb commit 9396163

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/ql-vscode/src/common/vscode/telemetry.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { showBinaryChoiceWithUrlDialog } from "./dialog";
2020
import type { RedactableError } from "../errors";
2121
import type { SemVer } from "semver";
2222
import type { AppTelemetry } from "../telemetry";
23+
import { EnvelopeTelemetry } from "applicationinsights/out/Declarations/Contracts";
2324

2425
// Key is injected at build time through the APP_INSIGHTS_KEY environment variable.
2526
const key = "REPLACE-APP-INSIGHTS-KEY";
@@ -132,9 +133,9 @@ export class ExtensionTelemetryListener
132133
const client = this.reporter["appInsightsClient"] as TelemetryClient;
133134
if (client) {
134135
// add a telemetry processor to delete unwanted properties
135-
client.addTelemetryProcessor((envelope: any) => {
136+
client.addTelemetryProcessor((envelope: EnvelopeTelemetry) => {
136137
tagsToRemove.forEach((tag) => delete envelope.tags[tag]);
137-
const baseDataProperties = (envelope.data as any)?.baseData?.properties;
138+
const baseDataProperties = envelope.data.baseData?.properties;
138139
if (baseDataProperties) {
139140
baseDataPropertiesToRemove.forEach(
140141
(prop) => delete baseDataProperties[prop],

0 commit comments

Comments
 (0)