Skip to content

Commit b6ee640

Browse files
do not run for cloud desktop
Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 0b7dc77 commit b6ee640

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/core/src/shared/crashMonitoring.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
import path from 'path'
66
import globals, { isWeb } from './extensionGlobals'
7-
import { getSessionId as _getSessionId } from './telemetry/util'
7+
import { getSessionId as _getSessionId, getComputeEnvType } from './telemetry/util'
88
import { getErrorId, getTelemetryReason, getTelemetryReasonDesc, isFileNotFoundError, ToolkitError } from './errors'
99
import { isAutomation, isDebugInstance } from './vscode/env'
1010
import { DevSettings } from './settings'
@@ -82,6 +82,12 @@ export class CrashMonitoring {
8282
static #instance: CrashMonitoring | undefined
8383
/** Returns an instance of this class or undefined if any initial validation fails. */
8484
public static async instance(): Promise<CrashMonitoring | undefined> {
85+
// - We do not support web due to some incompatibilities
86+
// - We do not support cloud desktop due to false crash reports due to sleep+vpn+ssh timeouts with the IDE
87+
if (isWeb() || (await getComputeEnvType()) === 'cloudDesktop-amzn') {
88+
return undefined
89+
}
90+
8591
// Since the first attempt to create an instance may have failed, we do not
8692
// attempt to create an instance again and return whatever we have
8793
if (this.#didTryCreate === true) {
@@ -108,10 +114,6 @@ export class CrashMonitoring {
108114

109115
/** Start the Crash Monitoring process */
110116
public async start() {
111-
if (isWeb()) {
112-
return
113-
}
114-
115117
// During tests, the Prod code also runs this function. It interferes with telemetry assertion since it reports additional heartbeats.
116118
if (this.isAutomation) {
117119
return

0 commit comments

Comments
 (0)