Reapply badclient commit

Fixes #120781

Add second file this time
This commit is contained in:
Matt Bierner 2021-04-08 09:09:25 -07:00
parent 3702538139
commit 604b950f0d
No known key found for this signature in database
GPG key ID: 099C331567E11888
2 changed files with 4 additions and 2 deletions

View file

@ -39,13 +39,15 @@ export class TypeScriptServerError extends Error {
"TypeScriptRequestErrorProperties" : { "TypeScriptRequestErrorProperties" : {
"command" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, "command" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"serverid" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, "serverid" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"sanitizedstack" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } "sanitizedstack" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"badclient" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
} }
*/ */
return { return {
command: this.serverCommand, command: this.serverCommand,
serverid: this.serverId, serverid: this.serverId,
sanitizedstack: this.sanitizedStack || '', sanitizedstack: this.sanitizedStack || '',
badclient: /\bBADCLIENT\b/.test(this.stack || ''),
} as const; } as const;
} }

View file

@ -14,7 +14,7 @@ interface PackageInfo {
} }
export interface TelemetryProperties { export interface TelemetryProperties {
readonly [prop: string]: string | number | undefined; readonly [prop: string]: string | number | boolean | undefined;
} }
export interface TelemetryReporter { export interface TelemetryReporter {