Skip to content

Commit 0c64d0d

Browse files
committed
Include recommended extensions in telemetry events to determine success
1 parent 6336a4a commit 0c64d0d

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,22 @@ export class ExtensionsListView extends ViewsViewletPanel {
335335
return TPromise.join([othersPromise, workspacePromise])
336336
.then(([others, workspaceRecommendations]) => {
337337
const names = this.getTrimmedRecommendations(installedExtensions, value, fileBasedRecommendations, others, workspaceRecommendations);
338-
338+
const recommendationsWithReason = this.tipsService.getAllRecommendationsWithReason();
339339
/* __GDPR__
340340
"extensionAllRecommendations:open" : {
341-
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
341+
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
342+
"recommendations": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
342343
}
343344
*/
344-
this.telemetryService.publicLog('extensionAllRecommendations:open', { count: names.length });
345+
this.telemetryService.publicLog('extensionAllRecommendations:open', {
346+
count: names.length,
347+
recommendations: names.map(id => {
348+
return {
349+
id,
350+
recommendationReason: recommendationsWithReason[id].reasonId
351+
};
352+
})
353+
});
345354
if (!names.length) {
346355
return TPromise.as(new PagedModel([]));
347356
}
@@ -373,13 +382,23 @@ export class ExtensionsListView extends ViewsViewletPanel {
373382
others = others.filter(x => workspaceRecommendations.indexOf(x.toLowerCase()) === -1);
374383

375384
const names = this.getTrimmedRecommendations(installedExtensions, value, fileBasedRecommendations, others, []);
385+
const recommendationsWithReason = this.tipsService.getAllRecommendationsWithReason();
376386

377387
/* __GDPR__
378388
"extensionRecommendations:open" : {
379-
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
389+
"count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
390+
"recommendations": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
380391
}
381392
*/
382-
this.telemetryService.publicLog('extensionRecommendations:open', { count: names.length });
393+
this.telemetryService.publicLog('extensionRecommendations:open', {
394+
count: names.length,
395+
recommendations: names.map(id => {
396+
return {
397+
id,
398+
recommendationReason: recommendationsWithReason[id].reasonId
399+
};
400+
})
401+
});
383402

384403
if (!names.length) {
385404
return TPromise.as(new PagedModel([]));

0 commit comments

Comments
 (0)