|
6 | 6 | import * as nls from 'vs/nls';
|
7 | 7 | import { URI } from 'vs/base/common/uri';
|
8 | 8 | import * as errors from 'vs/base/common/errors';
|
9 |
| -import { equals, deepClone, assign } from 'vs/base/common/objects'; |
| 9 | +import { equals, deepClone } from 'vs/base/common/objects'; |
10 | 10 | import * as DOM from 'vs/base/browser/dom';
|
11 | 11 | import { Separator } from 'vs/base/browser/ui/actionbar/actionbar';
|
12 | 12 | import { IAction } from 'vs/base/common/actions';
|
@@ -422,8 +422,8 @@ export class ElectronWindow extends Disposable {
|
422 | 422 | this.updateTouchbarMenu();
|
423 | 423 |
|
424 | 424 | // Crash reporter (if enabled)
|
425 |
| - if (!this.environmentService.disableCrashReporter && product.crashReporter && product.hockeyApp && this.configurationService.getValue('telemetry.enableCrashReporter')) { |
426 |
| - this.setupCrashReporter(product.crashReporter.companyName, product.crashReporter.productName, product.hockeyApp); |
| 425 | + if (!this.environmentService.disableCrashReporter && product.crashReporter && product.appCenter && this.configurationService.getValue('telemetry.enableCrashReporter')) { |
| 426 | + this.setupCrashReporter(product.crashReporter.companyName, product.crashReporter.productName, product.appCenter); |
427 | 427 | }
|
428 | 428 | }
|
429 | 429 |
|
@@ -536,26 +536,26 @@ export class ElectronWindow extends Disposable {
|
536 | 536 | }
|
537 | 537 | }
|
538 | 538 |
|
539 |
| - private async setupCrashReporter(companyName: string, productName: string, hockeyAppConfig: typeof product.hockeyApp): Promise<void> { |
540 |
| - if (!hockeyAppConfig) { |
| 539 | + private async setupCrashReporter(companyName: string, productName: string, appCenterConfig: typeof product.appCenter): Promise<void> { |
| 540 | + if (!appCenterConfig) { |
541 | 541 | return;
|
542 | 542 | }
|
543 | 543 |
|
| 544 | + const appCenterURL = isWindows ? appCenterConfig[process.arch === 'ia32' ? 'win32-ia32' : 'win32-x64'] |
| 545 | + : isLinux ? appCenterConfig[`linux-x64`] : appCenterConfig.darwin; |
| 546 | + const info = await this.telemetryService.getTelemetryInfo(); |
| 547 | + |
544 | 548 | // base options with product info
|
545 | 549 | const options: CrashReporterStartOptions = {
|
546 | 550 | companyName,
|
547 | 551 | productName,
|
548 |
| - submitURL: isWindows ? hockeyAppConfig[process.arch === 'ia32' ? 'win32-ia32' : 'win32-x64'] : isLinux ? hockeyAppConfig[`linux-x64`] : hockeyAppConfig.darwin, |
| 552 | + submitURL: appCenterURL.concat('&uid=', info.machineId, '&iid=', info.instanceId), |
549 | 553 | extra: {
|
550 | 554 | vscode_version: product.version,
|
551 | 555 | vscode_commit: product.commit || ''
|
552 | 556 | }
|
553 | 557 | };
|
554 | 558 |
|
555 |
| - // mixin telemetry info |
556 |
| - const info = await this.telemetryService.getTelemetryInfo(); |
557 |
| - assign(options.extra, { vscode_sessionId: info.sessionId }); |
558 |
| - |
559 | 559 | // start crash reporter right here
|
560 | 560 | crashReporter.start(deepClone(options));
|
561 | 561 |
|
|
0 commit comments