Fix empty props and measurements in pipeline
This commit is contained in:
Родитель
c77fda6630
Коммит
3f927c1dbc
|
@ -304,6 +304,9 @@ export class BaseTelemetryReporter {
|
||||||
const cleanProperties = this.cloneAndChange(properties, (_key: string, prop: string) => this.anonymizeFilePaths(prop, this.firstParty));
|
const cleanProperties = this.cloneAndChange(properties, (_key: string, prop: string) => this.anonymizeFilePaths(prop, this.firstParty));
|
||||||
properties = this.removePropertiesWithPossibleUserInfo(cleanProperties);
|
properties = this.removePropertiesWithPossibleUserInfo(cleanProperties);
|
||||||
}
|
}
|
||||||
|
// The pipeline doesn't like undefined measurements or properties bag so at least send an empty object
|
||||||
|
properties = properties ?? {};
|
||||||
|
measurements = measurements ?? {};
|
||||||
eventName = `${this.extensionId}/${eventName}`;
|
eventName = `${this.extensionId}/${eventName}`;
|
||||||
this.telemetryAppender.logEvent(eventName, { properties, measurements });
|
this.telemetryAppender.logEvent(eventName, { properties, measurements });
|
||||||
}
|
}
|
||||||
|
@ -369,6 +372,9 @@ export class BaseTelemetryReporter {
|
||||||
});
|
});
|
||||||
properties = this.removePropertiesWithPossibleUserInfo(cleanProperties);
|
properties = this.removePropertiesWithPossibleUserInfo(cleanProperties);
|
||||||
}
|
}
|
||||||
|
// The pipeline doesn't like undefined measurements or properties bag so at least send an empty object
|
||||||
|
properties = properties ?? {};
|
||||||
|
measurements = measurements ?? {};
|
||||||
eventName = `${this.extensionId}/${eventName}`;
|
eventName = `${this.extensionId}/${eventName}`;
|
||||||
this.telemetryAppender.logEvent(eventName, { properties, measurements });
|
this.telemetryAppender.logEvent(eventName, { properties, measurements });
|
||||||
}
|
}
|
||||||
|
@ -423,6 +429,9 @@ export class BaseTelemetryReporter {
|
||||||
}
|
}
|
||||||
properties = this.removePropertiesWithPossibleUserInfo(cleanProperties);
|
properties = this.removePropertiesWithPossibleUserInfo(cleanProperties);
|
||||||
}
|
}
|
||||||
|
// The pipeline doesn't like undefined measurements or properties bag so at least send an empty object
|
||||||
|
properties = properties ?? {};
|
||||||
|
measurements = measurements ?? {};
|
||||||
this.telemetryAppender.logException(error, { properties, measurements });
|
this.telemetryAppender.logException(error, { properties, measurements });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче