Skip to content

Commit

Permalink
Merge pull request #71601 from Microsoft/joao/snap-info
Browse files Browse the repository at this point in the history
Report snap on telemetry, issue reporter, about menu
  • Loading branch information
joaomoreno authored Apr 2, 2019
2 parents 0ac1114 + 3773487 commit 54ee804
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/vs/code/electron-browser/issue/issueReporterMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ export class IssueReporter extends Disposable {

this.initServices(configuration);

const isSnap = process.platform === 'linux' && process.env.SNAP && process.env.SNAP_REVISION;
this.issueReporterModel = new IssueReporterModel({
issueType: configuration.data.issueType || IssueType.Bug,
versionInfo: {
vscodeVersion: `${pkg.name} ${pkg.version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})`,
os: `${os.type()} ${os.arch()} ${os.release()}`
os: `${os.type()} ${os.arch()} ${os.release()}${isSnap ? ' snap' : ''}`
},
extensionsDisabled: !!this.environmentService.disableExtensions,
});
Expand Down
5 changes: 5 additions & 0 deletions src/vs/platform/telemetry/node/commonProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export function resolveCommonProperties(commit: string | undefined, version: str
}
});

if (process.platform === 'linux' && process.env.SNAP && process.env.SNAP_REVISION) {
// __GDPR__COMMON__ "common.nodeArch" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
result['common.snap'] = 'true';
}

return readFile(installSourcePath, 'utf8').then(contents => {

// __GDPR__COMMON__ "common.source" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
Expand Down
3 changes: 2 additions & 1 deletion src/vs/platform/windows/electron-main/windowsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
version = `${version} (${product.target} setup)`;
}

const isSnap = process.platform === 'linux' && process.env.SNAP && process.env.SNAP_REVISION;
const detail = nls.localize('aboutDetail',
"Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nChrome: {4}\nNode.js: {5}\nV8: {6}\nOS: {7}",
version,
Expand All @@ -389,7 +390,7 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
process.versions['chrome'],
process.versions['node'],
process.versions['v8'],
`${os.type()} ${os.arch()} ${os.release()}`
`${os.type()} ${os.arch()} ${os.release()}${isSnap ? ' snap' : ''}`
);

const ok = nls.localize('okButton', "OK");
Expand Down

0 comments on commit 54ee804

Please sign in to comment.