@@ -349,31 +349,22 @@ export class BaseTelemetryReporter {
349
349
* @param eventName The name of the event
350
350
* @param properties The properties of the event
351
351
* @param measurements The measurements (numeric values) to send with the event
352
- * @param errorProps Properties to readct. If undefined then we assume all properties belong to the error prop and will be anonymized
353
352
* @param sanitize Whether or not to sanitize to the properties and measures
354
353
* @param dangerous Whether or not to ignore telemetry level
355
354
*/
356
355
private internalSendTelemetryErrorEvent (
357
356
eventName : string ,
358
357
properties : TelemetryEventProperties | undefined ,
359
358
measurements : TelemetryEventMeasurements | undefined ,
360
- errorProps : string [ ] | undefined ,
361
359
sanitize : boolean ,
362
360
dangerous : boolean
363
361
) : void {
364
362
if ( ( this . shouldSendErrorTelemetry ( ) || dangerous ) && eventName !== "" ) {
365
363
366
364
properties = { ...properties , ...this . getCommonProperties ( ) } ;
367
365
if ( sanitize ) {
368
- // always clean the properties if first party
369
- // do not send any error properties if we shouldn't send error telemetry
370
- // if we have no errorProps, assume all are error props
371
- const cleanProperties = this . cloneAndChange ( properties , ( key : string , prop : string ) => {
372
-
373
- if ( errorProps === undefined || errorProps . indexOf ( key ) !== - 1 ) {
374
- return "REDACTED" ;
375
- }
376
-
366
+ // Anonymize the file paths
367
+ const cleanProperties = this . cloneAndChange ( properties , ( _ : string , prop : string ) => {
377
368
return this . anonymizeFilePaths ( prop , this . firstParty ) ;
378
369
} ) ;
379
370
properties = this . removePropertiesWithPossibleUserInfo ( cleanProperties ) ;
@@ -388,10 +379,9 @@ export class BaseTelemetryReporter {
388
379
* @param eventName The name of the event
389
380
* @param properties The properties to send with the event
390
381
* @param measurements The measurements (numeric values) to send with the event
391
- * @param errorProps If not present then we assume all properties belong to the error prop and will be anonymized
392
382
*/
393
- public sendTelemetryErrorEvent ( eventName : string , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements , errorProps ?: string [ ] ) : void {
394
- this . internalSendTelemetryErrorEvent ( eventName , properties , measurements , errorProps , true , false ) ;
383
+ public sendTelemetryErrorEvent ( eventName : string , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements ) : void {
384
+ this . internalSendTelemetryErrorEvent ( eventName , properties , measurements , true , false ) ;
395
385
}
396
386
397
387
/**
@@ -400,13 +390,12 @@ export class BaseTelemetryReporter {
400
390
* @param eventName The name of the event
401
391
* @param properties The properties to send with the event
402
392
* @param measurements The measurements (numeric values) to send with the event
403
- * @param errorProps If not present then we assume all properties belong to the error prop and will be anonymized
404
393
* @param sanitize Whether or not to run the properties and measures through sanitiziation, defaults to true
405
394
*/
406
- public sendDangerousTelemetryErrorEvent ( eventName : string , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements , errorProps ?: string [ ] , sanitize = true ) : void {
395
+ public sendDangerousTelemetryErrorEvent ( eventName : string , properties ?: TelemetryEventProperties , measurements ?: TelemetryEventMeasurements , sanitize = true ) : void {
407
396
// Since telemetry is probably off when sending dangerously, we must start the appender
408
397
this . telemetryAppender . instantiateAppender ( ) ;
409
- this . internalSendTelemetryErrorEvent ( eventName , properties , measurements , errorProps , sanitize , true ) ;
398
+ this . internalSendTelemetryErrorEvent ( eventName , properties , measurements , sanitize , true ) ;
410
399
}
411
400
412
401
/**
0 commit comments