@@ -12,21 +12,24 @@ export class LocalSSHMetricsReporter {
1212 private readonly logService : ILogService ,
1313 ) { }
1414
15- async reportConfigStatus ( gitpodHost : string | undefined , status : 'success' | 'failure' , failureCode ?: string ) : Promise < void > {
15+ reportConfigStatus ( gitpodHost : string , status : 'success' | 'failure' , failureCode ?: string ) {
1616 if ( status === 'success' ) {
1717 failureCode = 'None' ;
1818 }
19- return addCounter ( gitpodHost , 'vscode_desktop_local_ssh_config_total' , { status, failure_code : failureCode ?? 'Unknown' } , 1 , this . logService ) ;
19+ addCounter ( gitpodHost , 'vscode_desktop_local_ssh_config_total' , { status, failure_code : failureCode ?? 'Unknown' } , 1 , this . logService )
20+ . catch ( e => this . logService . error ( 'Error while reporting metrics' , e ) ) ;
2021 }
2122
22- async reportPingExtensionStatus ( gitpodHost : string | undefined , status : 'success' | 'failure' ) : Promise < void > {
23- return addCounter ( gitpodHost , 'vscode_desktop_ping_extension_server_total' , { status } , 1 , this . logService ) ;
23+ reportPingExtensionStatus ( gitpodHost : string | undefined , status : 'success' | 'failure' ) {
24+ addCounter ( gitpodHost , 'vscode_desktop_ping_extension_server_total' , { status } , 1 , this . logService )
25+ . catch ( e => this . logService . error ( 'Error while reporting metrics' , e ) ) ;
2426 }
2527
26- async reportConnectionStatus ( gitpodHost : string | undefined , phase : 'connected' | 'connecting' | 'failed' , failureCode ?: string ) : Promise < void > {
28+ reportConnectionStatus ( gitpodHost : string , phase : 'connected' | 'connecting' | 'failed' , failureCode ?: string ) {
2729 if ( phase === 'connecting' || phase === 'connected' ) {
2830 failureCode = 'None' ;
2931 }
30- return addCounter ( gitpodHost , 'vscode_desktop_local_ssh_total' , { phase, failure_code : failureCode ?? 'Unknown' } , 1 , this . logService ) ;
32+ addCounter ( gitpodHost , 'vscode_desktop_local_ssh_total' , { phase, failure_code : failureCode ?? 'Unknown' } , 1 , this . logService )
33+ . catch ( e => this . logService . error ( 'Error while reporting metrics' , e ) ) ;
3134 }
3235}
0 commit comments