File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
extensions/ql-vscode/src/common/vscode Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import { showBinaryChoiceWithUrlDialog } from "./dialog";
2020import type { RedactableError } from "../errors" ;
2121import type { SemVer } from "semver" ;
2222import type { AppTelemetry } from "../telemetry" ;
23+ import type { EnvelopeTelemetry } from "applicationinsights/out/Declarations/Contracts" ;
2324
2425// Key is injected at build time through the APP_INSIGHTS_KEY environment variable.
2526const key = "REPLACE-APP-INSIGHTS-KEY" ;
@@ -128,12 +129,13 @@ export class ExtensionTelemetryListener
128129 ) ;
129130 this . push ( this . reporter ) ;
130131
131- const client = ( this . reporter as any ) . appInsightsClient as TelemetryClient ;
132+ // The appInsightsClient field is private but we want to access it anyway
133+ const client = this . reporter [ "appInsightsClient" ] as TelemetryClient ;
132134 if ( client ) {
133135 // add a telemetry processor to delete unwanted properties
134- client . addTelemetryProcessor ( ( envelope : any ) => {
136+ client . addTelemetryProcessor ( ( envelope : EnvelopeTelemetry ) => {
135137 tagsToRemove . forEach ( ( tag ) => delete envelope . tags [ tag ] ) ;
136- const baseDataProperties = ( envelope . data as any ) ? .baseData ?. properties ;
138+ const baseDataProperties = envelope . data . baseData ?. properties ;
137139 if ( baseDataProperties ) {
138140 baseDataPropertiesToRemove . forEach (
139141 ( prop ) => delete baseDataProperties [ prop ] ,
You can’t perform that action at this time.
0 commit comments