diff --git a/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts b/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts index 3634ef5008f4..b693f81e7e38 100644 --- a/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts +++ b/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts @@ -10,27 +10,34 @@ export type NativePythonTelemetry = MissingCondaEnvironments; export type MissingCondaEnvironments = { event: 'MissingCondaEnvironments'; data: { - missing: number; - userProvidedCondaExe?: boolean; - rootPrefixNotFound?: boolean; - condaPrefixNotFound?: boolean; - condaManagerNotFound?: boolean; - sysRcNotFound?: boolean; - userRcNotFound?: boolean; - otherRcNotFound?: boolean; - missingEnvDirsFromSysRc?: number; - missingEnvDirsFromUserRc?: number; - missingEnvDirsFromOtherRc?: number; - missingFromSysRcEnvDirs?: number; - missingFromUserRcEnvDirs?: number; - missingFromOtherRcEnvDirs?: number; + missingCondaEnvironments: { + missing: number; + envDirsNotFound?: number; + userProvidedCondaExe?: boolean; + rootPrefixNotFound?: boolean; + condaPrefixNotFound?: boolean; + condaManagerNotFound?: boolean; + sysRcNotFound?: boolean; + userRcNotFound?: boolean; + otherRcNotFound?: boolean; + missingEnvDirsFromSysRc?: number; + missingEnvDirsFromUserRc?: number; + missingEnvDirsFromOtherRc?: number; + missingFromSysRcEnvDirs?: number; + missingFromUserRcEnvDirs?: number; + missingFromOtherRcEnvDirs?: number; + }; }; }; export function sendNativeTelemetry(data: NativePythonTelemetry): void { switch (data.event) { case 'MissingCondaEnvironments': { - sendTelemetryEvent(EventName.NATIVE_FINDER_MISSING_CONDA_ENVS, undefined, data.data); + sendTelemetryEvent( + EventName.NATIVE_FINDER_MISSING_CONDA_ENVS, + undefined, + data.data.missingCondaEnvironments, + ); break; } default: { diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index e0a90e9192e6..ade7ec8a8c15 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -1402,6 +1402,7 @@ export interface IEventNamePropertyMapping { /* __GDPR__ "native_finder_missing_conda_envs" : { "missing" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, + "envDirsNotFound" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "userProvidedCondaExe" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" }, "rootPrefixNotFound" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" }, "condaPrefixNotFound" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" }, @@ -1419,21 +1420,63 @@ export interface IEventNamePropertyMapping { * Number of missing conda environments. */ missing: number; + /** + * Total number of env_dirs not found even after parsing the conda_rc files. + * This will tell us that we are either unable to parse some of the conda_rc files or there are other + * env_dirs that we are not able to find. + */ + envDirsNotFound?: number; /** * Whether a conda exe was provided by the user. */ userProvidedCondaExe?: boolean; + /** + * Whether the user provided a conda executable. + */ rootPrefixNotFound?: boolean; + /** + * Whether the conda prefix returned by conda was not found by us. + */ condaPrefixNotFound?: boolean; + /** + * Whether we found a conda manager or not. + */ condaManagerNotFound?: boolean; + /** + * Whether we failed to find the system rc path. + */ sysRcNotFound?: boolean; + /** + * Whether we failed to find the user rc path. + */ userRcNotFound?: boolean; + /** + * Number of config files (excluding sys and user rc) that were not found. + */ otherRcNotFound?: boolean; + /** + * Number of conda envs that were not found by us, and the envs belong to env_dirs in the sys config rc. + */ missingEnvDirsFromSysRc?: number; + /** + * Number of conda envs that were not found by us, and the envs belong to env_dirs in the user config rc. + */ missingEnvDirsFromUserRc?: number; + /** + * Number of conda envs that were not found by us, and the envs belong to env_dirs in the other config rc. + */ missingEnvDirsFromOtherRc?: number; + /** + * Number of conda envs that were not found by us, and the envs belong to env_dirs in the sys config rc. + */ missingFromSysRcEnvDirs?: number; + /** + * Number of conda envs that were not found by us, and the envs belong to env_dirs in the user config rc. + */ missingFromUserRcEnvDirs?: number; + /** + * Number of conda envs that were not found by us, and the envs belong to env_dirs in the other config rc. + */ missingFromOtherRcEnvDirs?: number; }; /**