Skip to content

Commit 31ca1f1

Browse files
committed
remove heartbeat telemetry, gitpod-remote extension no longer has heartbeat
1 parent d790d00 commit 31ca1f1

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/remoteConnector.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { withServerApi } from './internalApi';
2525
import TelemetryReporter from './telemetryReporter';
2626
import { addHostToHostFile, checkNewHostInHostkeys } from './ssh/hostfile';
2727
import { HeartbeatManager } from './heartbeat';
28-
import { getGitpodVersion, GitpodVersion, isFeatureSupported, isOauthInspectSupported, ScopeFeature } from './featureSupport';
28+
import { getGitpodVersion, isFeatureSupported, isOauthInspectSupported, ScopeFeature } from './featureSupport';
2929
import SSHConfiguration from './ssh/sshConfig';
3030
import { ExperimentalSettings, isUserOverrideSetting } from './experiments';
3131
import { ISyncExtension, NoSettingsSyncSession, NoSyncStoreError, parseSyncData, SettingsSync, SyncResource } from './settingsSync';
@@ -861,23 +861,20 @@ export default class RemoteConnector extends Disposable {
861861
}
862862
}
863863

864-
private async startHeartBeat(session: vscode.AuthenticationSession, connectionInfo: SSHConnectionParams, gitpodVersion: GitpodVersion) {
864+
private async startHeartBeat(session: vscode.AuthenticationSession, connectionInfo: SSHConnectionParams) {
865865
if (this.heartbeatManager) {
866866
return;
867867
}
868868

869869
this.heartbeatManager = new HeartbeatManager(connectionInfo.gitpodHost, connectionInfo.workspaceId, connectionInfo.instanceId, !!connectionInfo.debugWorkspace, session.accessToken, this.publicApi, this.logger, this.telemetry);
870870

871-
// gitpod remote extension installation is async so sometimes gitpod-desktop will activate before gitpod-remote
872-
// let's try a few times for it to finish install
873871
try {
872+
// TODO: remove this in the future, gitpod-remote no longer has the heartbeat logic, it's just here until users
873+
// update to the latest version of gitpod-remote
874874
await retry(async () => {
875875
await vscode.commands.executeCommand('__gitpod.cancelGitpodRemoteHeartbeat');
876876
}, 3000, 15);
877-
this.telemetry.sendTelemetryEvent('vscode_desktop_heartbeat_state', { enabled: String(true), gitpodHost: connectionInfo.gitpodHost, workspaceId: connectionInfo.workspaceId, instanceId: connectionInfo.instanceId, debugWorkspace: String(!!connectionInfo.debugWorkspace), gitpodVersion: gitpodVersion.raw });
878877
} catch {
879-
this.logger.error(`Could not execute '__gitpod.cancelGitpodRemoteHeartbeat' command`);
880-
this.telemetry.sendTelemetryEvent('vscode_desktop_heartbeat_state', { enabled: String(false), gitpodHost: connectionInfo.gitpodHost, workspaceId: connectionInfo.workspaceId, instanceId: connectionInfo.instanceId, debugWorkspace: String(!!connectionInfo.debugWorkspace), gitpodVersion: gitpodVersion.raw });
881878
}
882879
}
883880

@@ -1030,7 +1027,7 @@ export default class RemoteConnector extends Disposable {
10301027

10311028
const heartbeatSupported = session.scopes.includes(ScopeFeature.LocalHeartbeat);
10321029
if (heartbeatSupported) {
1033-
this.startHeartBeat(session, connectionInfo, gitpodVersion);
1030+
this.startHeartBeat(session, connectionInfo);
10341031
} else {
10351032
this.logger.warn(`Local heartbeat not supported in ${connectionInfo.gitpodHost}, using version ${gitpodVersion.raw}`);
10361033
}

0 commit comments

Comments
 (0)