diff --git a/USAGE_DATA.md b/USAGE_DATA.md index 22f99d6ade..ce86f7ea20 100644 --- a/USAGE_DATA.md +++ b/USAGE_DATA.md @@ -16,6 +16,7 @@ vscode-java has opt-in telemetry collection, provided by [vscode-redhat-telemetr * The total size (in bytes) of libraries that were indexed after project initialization * Information about the following settings. In the case of settings that store a well defined value (eg. path/url/string), we simply collect whether the setting has been set. * `java.settings.url`, `java.format.settings.url`, `java.quickfix.showAt`, `java.symbols.includeSourceMethodDeclarations`, `java.completion.guessMethodArguments`, `java.completion.postfix.enabled`, `java.cleanup.actionsOnSave`, `java.sharedIndexes.enabled`, `java.inlayHints.parameterNames.enabled`, `java.server.launchMode`, `java.autobuild.enabled` + * The extension name and the choice made when a recommendation to install a 3rd party extension is proposed ## What's included in the general telemetry data diff --git a/src/recommendation/handlerImpl.ts b/src/recommendation/handlerImpl.ts index 78027ba510..ffc1d3659a 100644 --- a/src/recommendation/handlerImpl.ts +++ b/src/recommendation/handlerImpl.ts @@ -4,6 +4,7 @@ import * as vscode from "vscode"; import { IHandler } from "./handler"; +import { Telemetry } from "../telemetry"; const KEY_RECOMMENDATION_USER_CHOICE_MAP = "recommendationUserChoice"; @@ -54,6 +55,10 @@ export class HandlerImpl implements IHandler { const actions: Array = Object.values(UserChoice); const answer = await vscode.window.showInformationMessage(message, ...actions); + await Telemetry.sendTelemetry('recommendation', { + recommendation: extName, + choice:answer?.toLowerCase() + }); if (answer === UserChoice.install) { await installExtensionCmdHandler(extName, extName); }