Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more data for conda envs not found #23770

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
43 changes: 43 additions & 0 deletions src/client/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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;
};
/**
Expand Down
Loading