File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ type CommonProperties = {
2828export class Telemetry {
2929 private readonly commonProperties : CommonProperties ;
3030
31- constructor ( private readonly session : Session , private readonly eventCache : EventCache = EventCache . getInstance ( ) ) {
31+ constructor (
32+ private readonly session : Session ,
33+ private readonly eventCache : EventCache = EventCache . getInstance ( )
34+ ) {
3235 this . commonProperties = {
3336 ...MACHINE_METADATA ,
3437 } ;
@@ -69,11 +72,11 @@ export class Telemetry {
6972 logger . debug ( mongoLogId ( 1_000_000 ) , "telemetry" , "Telemetry is disabled, skipping events." ) ;
7073 return ;
7174 }
72-
75+
7376 await this . emit ( events ) ;
7477 } catch ( error ) {
7578 logger . debug ( mongoLogId ( 1_000_002 ) , "telemetry" , `Error emitting telemetry events: ${ error } ` ) ;
76- }
79+ }
7780 }
7881
7982 /**
@@ -111,8 +114,8 @@ export class Telemetry {
111114 }
112115
113116 logger . warning (
114- mongoLogId ( 1_000_005 ) ,
115- "telemetry" ,
117+ mongoLogId ( 1_000_005 ) ,
118+ "telemetry" ,
116119 `Error sending event to client: ${ result . error instanceof Error ? result . error . message : String ( result . error ) } `
117120 ) ;
118121 this . eventCache . appendEvents ( events ) ;
@@ -132,4 +135,4 @@ export class Telemetry {
132135 } ;
133136 }
134137 }
135- }
138+ }
You can’t perform that action at this time.
0 commit comments