@@ -12,21 +12,24 @@ export class LocalSSHMetricsReporter {
12
12
private readonly logService : ILogService ,
13
13
) { }
14
14
15
- async reportConfigStatus ( gitpodHost : string | undefined , status : 'success' | 'failure' , failureCode ?: string ) : Promise < void > {
15
+ reportConfigStatus ( gitpodHost : string , status : 'success' | 'failure' , failureCode ?: string ) {
16
16
if ( status === 'success' ) {
17
17
failureCode = 'None' ;
18
18
}
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 ) ) ;
20
21
}
21
22
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 ) ) ;
24
26
}
25
27
26
- async reportConnectionStatus ( gitpodHost : string | undefined , phase : 'connected' | 'connecting' | 'failed' , failureCode ?: string ) : Promise < void > {
28
+ reportConnectionStatus ( gitpodHost : string , phase : 'connected' | 'connecting' | 'failed' , failureCode ?: string ) {
27
29
if ( phase === 'connecting' || phase === 'connected' ) {
28
30
failureCode = 'None' ;
29
31
}
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 ) ) ;
31
34
}
32
35
}
0 commit comments