add telemetry appender that writes to log (#53603)

* add log-telemetry-appender and wire it up in the shell

* enable log-only-telemetry in scripts/code.[sh|bat]

* Reduce noise, separate log file for telemetry

* Print telemetry events from shared process to corresponding log channel

* Telemetry events for cli go to the log file for cli

* Merge cli telemetry with all data with cli log

* Use LogAppender when running from source

* Skip check on isBuilt as the same is done in the shared process

* Telemetry events from main process go to corresponding log file

* Telemetry events from issue reporter go to corresponding log file

* Cleanup to reduce diff amount as I have OCD

* More cleanup

* Open telemetry log file via the Open Log File command

* Use regex to strip out common data

* Tests
This commit is contained in:
Johannes Rieken
2018-07-11 21:21:40 +02:00
committed by Ramya Rao
parent ab4338f19d
commit 19f25e4801
10 changed files with 132 additions and 35 deletions

View File

@@ -245,7 +245,7 @@ export function main(argv: ParsedArgs): TPromise<void> {
if (isBuilt && !extensionDevelopmentPath && !envService.args['disable-telemetry'] && product.enableTelemetry) {
if (product.aiConfig && product.aiConfig.asimovKey) {
appenders.push(new AppInsightsAppender(eventPrefix, null, product.aiConfig.asimovKey));
appenders.push(new AppInsightsAppender(eventPrefix, null, product.aiConfig.asimovKey, logService));
}
const config: ITelemetryServiceConfig = {