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

Capture additional telemetry for conda #23810

Merged
merged 1 commit into from
Jul 15, 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 @@ -49,6 +49,7 @@ export interface NativeEnvManagerInfo {

export type NativeCondaInfo = {
canSpawnConda: boolean;
userProvidedEnvFound?: boolean;
condaRcs: string[];
envDirs: string[];
environmentsTxt?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
condaDefaultPrefixInCondaExePath?: boolean;
canSpawnConda?: boolean;
nativeCanSpawnConda?: boolean;
userProvidedEnvFound?: boolean;
userProvidedCondaExe?: boolean;
condaInfoEnvsInvalid: number;
invalidCondaEnvs: number;
Expand Down Expand Up @@ -418,6 +419,7 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
condaTelemetry.nativeCanSpawnConda = nativeCondaInfo.canSpawnConda;
condaTelemetry.nativeCondaInfoEnvsDirs = new Set(nativeCondaInfo.envDirs).size;
condaTelemetry.nativeCondaRcs = new Set(nativeCondaInfo.condaRcs).size;
condaTelemetry.userProvidedEnvFound = nativeCondaInfo.userProvidedEnvFound;

const nativeEnvTxt = fsPath.normalize(nativeCondaInfo.environmentsTxt || '').toLowerCase();
condaTelemetry.nativeCondaEnvTxtExists = nativeCondaInfo.environmentsTxtExists === true;
Expand Down
8 changes: 7 additions & 1 deletion src/client/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,8 @@ export interface IEventNamePropertyMapping {
"environmentsWithoutPython" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"usingNativeLocator" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" },
"canSpawnConda" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" },
"nativeCanSpawnConda" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true , "owner": "donjayamanne"},
"nativeCanSpawnConda" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne"},
"userProvidedEnvFound" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" },
"condaRootPrefixFoundInInfoNotInNative" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" },
"condaRootPrefixInCondaExePath" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" },
"condaDefaultPrefixFoundInInfoNotInNative" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "donjayamanne" },
Expand Down Expand Up @@ -1350,6 +1351,11 @@ export interface IEventNamePropertyMapping {
* Conda exe can be spawned by native locator.
*/
nativeCanSpawnConda?: boolean;
/**
* Conda env belonging to the conda exe provided by the user is found by native locator.
* I.e. even if the user didn't provide the path to the conda exe, the conda env is found by native locator.
*/
userProvidedEnvFound?: boolean;
/**
* The number of the interpreters not found in disc.
*/
Expand Down
Loading