@@ -16,6 +16,7 @@ import { timeout } from './common/async';
16
16
import { MetricsReporter , getConnectMetricsInterceptor } from './metrics' ;
17
17
import { ILogService } from './services/logService' ;
18
18
import { WrapError } from './common/utils' ;
19
+ import { ITelemetryService } from './common/telemetry' ;
19
20
20
21
function isTelemetryEnabled ( ) : boolean {
21
22
const TELEMETRY_CONFIG_ID = 'telemetry' ;
@@ -52,7 +53,12 @@ export class GitpodPublicApi extends Disposable implements IGitpodAPI {
52
53
53
54
private workspaceStatusStreamMap = new Map < string , { onStatusChanged : vscode . Event < WorkspaceStatus > ; dispose : ( force ?: boolean ) => void ; increment : ( ) => void } > ( ) ;
54
55
55
- constructor ( private accessToken : string , private gitpodHost : string , private logger : ILogService ) {
56
+ constructor (
57
+ private readonly accessToken : string ,
58
+ private readonly gitpodHost : string ,
59
+ private readonly logger : ILogService ,
60
+ private readonly telemetryService : ITelemetryService
61
+ ) {
56
62
super ( ) ;
57
63
58
64
this . createClients ( ) ;
@@ -201,6 +207,7 @@ export class GitpodPublicApi extends Disposable implements IGitpodAPI {
201
207
// Remove this once it's fixed upstream
202
208
const message : string = e . stack || e . message || `${ e } ` ;
203
209
if ( message . includes ( 'New streams cannot be created after receiving a GOAWAY' ) ) {
210
+ this . telemetryService . sendTelemetryException ( e ) ;
204
211
this . logger . error ( 'Got GOAWAY bug, recreating connect client' ) ;
205
212
this . createClients ( ) ;
206
213
}
@@ -236,6 +243,7 @@ export class GitpodPublicApi extends Disposable implements IGitpodAPI {
236
243
// Remove this once it's fixed upstream
237
244
const message : string = e . stack || e . message || `${ e } ` ;
238
245
if ( message . includes ( 'New streams cannot be created after receiving a GOAWAY' ) ) {
246
+ this . telemetryService . sendTelemetryException ( e ) ;
239
247
this . logger . error ( 'Got GOAWAY bug, recreating connect client' ) ;
240
248
this . createClients ( ) ;
241
249
0 commit comments