@@ -676,12 +676,14 @@ export class IssueReporter extends Disposable {
676676
677677 private logSearchError ( error : Error ) {
678678 this . logService . warn ( 'issueReporter#search ' , error . message ) ;
679- /* __GDPR__
680- "issueReporterSearchError" : {
681- "message" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" }
682- }
683- */
684- this . telemetryService . publicLog ( 'issueReporterSearchError' , { message : error . message } ) ;
679+ type IssueReporterSearchErrorClassification = {
680+ message : { classification : 'CallstackOrException' , purpose : 'PerformanceAndHealth' }
681+ } ;
682+
683+ type IssueReporterSearchError = {
684+ message : string ;
685+ } ;
686+ this . telemetryService . publicLog2 < IssueReporterSearchError , IssueReporterSearchErrorClassification > ( 'issueReporterSearchError' , { message : error . message } ) ;
685687 }
686688
687689 private setUpTypes ( ) : void {
@@ -873,13 +875,15 @@ export class IssueReporter extends Disposable {
873875 return false ;
874876 }
875877
876- /* __GDPR__
877- "issueReporterSubmit" : {
878- "issueType" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
879- "numSimilarIssuesDisplayed" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
880- }
881- */
882- this . telemetryService . publicLog ( 'issueReporterSubmit' , { issueType : this . issueReporterModel . getData ( ) . issueType , numSimilarIssuesDisplayed : this . numberOfSearchResultsDisplayed } ) ;
878+ type IssueReporterSubmitClassification = {
879+ issueType : { classification : 'SystemMetaData' , purpose : 'FeatureInsight' , isMeasurement : true } ;
880+ numSimilarIssuesDisplayed : { classification : 'SystemMetaData' , purpose : 'FeatureInsight' , isMeasurement : true } ;
881+ } ;
882+ type IssueReporterSubmitEvent = {
883+ issueType : any ;
884+ numSimilarIssuesDisplayed : number ;
885+ } ;
886+ this . telemetryService . publicLog2 < IssueReporterSubmitEvent , IssueReporterSubmitClassification > ( 'issueReporterSubmit' , { issueType : this . issueReporterModel . getData ( ) . issueType , numSimilarIssuesDisplayed : this . numberOfSearchResultsDisplayed } ) ;
883887 this . hasBeenSubmitted = true ;
884888
885889 const baseUrl = this . getIssueUrlWithTitle ( ( < HTMLInputElement > this . getElementById ( 'issue-title' ) ) . value ) ;
@@ -1106,11 +1110,7 @@ export class IssueReporter extends Disposable {
11061110 // Exclude right click
11071111 if ( event . which < 3 ) {
11081112 shell . openExternal ( ( < HTMLAnchorElement > event . target ) . href ) ;
1109-
1110- /* __GDPR__
1111- "issueReporterViewSimilarIssue" : { }
1112- */
1113- this . telemetryService . publicLog ( 'issueReporterViewSimilarIssue' ) ;
1113+ this . telemetryService . publicLog2 ( 'issueReporterViewSimilarIssue' ) ;
11141114 }
11151115 }
11161116
@@ -1121,12 +1121,13 @@ export class IssueReporter extends Disposable {
11211121 } else {
11221122 const error = new Error ( `${ elementId } not found.` ) ;
11231123 this . logService . error ( error ) ;
1124- /* __GDPR__
1125- "issueReporterGetElementError" : {
1126- "message" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" }
1127- }
1128- */
1129- this . telemetryService . publicLog ( 'issueReporterGetElementError' , { message : error . message } ) ;
1124+ type IssueReporterGetElementErrorClassification = {
1125+ message : { classification : 'CallstackOrException' , purpose : 'PerformanceAndHealth' } ;
1126+ } ;
1127+ type IssueReporterGetElementErrorEvent = {
1128+ message : string ;
1129+ } ;
1130+ this . telemetryService . publicLog2 < IssueReporterGetElementErrorEvent , IssueReporterGetElementErrorClassification > ( 'issueReporterGetElementError' , { message : error . message } ) ;
11301131
11311132 return undefined ;
11321133 }
0 commit comments