@@ -19,8 +19,8 @@ export interface ITelemetryReporter {
1919export class TelemetryObserver {
2020 private reporter : ITelemetryReporter ;
2121 private platformInfo : PlatformInformation ;
22- private solutionId : string ;
23- private dotnetInfo : DotnetInfo ;
22+ private solutionId ? : string ;
23+ private dotnetInfo ? : DotnetInfo ;
2424
2525 constructor ( platformInfo : PlatformInformation , reporterCreator : ( ) => ITelemetryReporter ) {
2626 this . platformInfo = platformInfo ;
@@ -64,7 +64,7 @@ export class TelemetryObserver {
6464 }
6565
6666 private handleTelemetryEventMeasures ( event : TelemetryEventWithMeasures ) {
67- this . reporter . sendTelemetryEvent ( event . eventName , null , event . measures ) ;
67+ this . reporter . sendTelemetryEvent ( event . eventName , undefined , event . measures ) ;
6868 }
6969
7070 private async handleOmnisharpInitialisation ( event : OmnisharpInitialisation ) {
@@ -90,16 +90,16 @@ export class TelemetryObserver {
9090
9191 private handleTestExecutionCountReport ( event : TestExecutionCountReport ) {
9292 if ( event . debugCounts ) {
93- this . reporter . sendTelemetryEvent ( 'DebugTest' , null , event . debugCounts ) ;
93+ this . reporter . sendTelemetryEvent ( 'DebugTest' , undefined , event . debugCounts ) ;
9494 }
9595 if ( event . runCounts ) {
96- this . reporter . sendTelemetryEvent ( 'RunTest' , null , event . runCounts ) ;
96+ this . reporter . sendTelemetryEvent ( 'RunTest' , undefined , event . runCounts ) ;
9797 }
9898 }
9999
100100 private handleProjectConfigurationReceived ( event : ProjectConfiguration , telemetryProps : { [ key : string ] : string } ) {
101101 let projectConfig = event . projectConfiguration ;
102- telemetryProps [ 'SolutionId' ] = this . solutionId ;
102+ telemetryProps [ 'SolutionId' ] = this . solutionId ?? "" ;
103103 telemetryProps [ 'ProjectId' ] = projectConfig . ProjectId ;
104104 telemetryProps [ 'SessionId' ] = projectConfig . SessionId ;
105105 telemetryProps [ 'OutputType' ] = projectConfig . OutputKind ?. toString ( ) ?? "" ;
0 commit comments