You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add telemetry properties for environment resolution and package installation (#25927)
Co-authored-by: Copilot <copilot@github.com>
1. Add `duration` to `INVOKE_TOOL`
2. Add `resolveOutcome` to `configure_python_environment`
3. Add `envType` to all tools that resolve an environment
4. Add `packageCount` and `installerType` to `install_python_packages`
5. Add `responsePackageCount` to `get_python_environment_details`
---------
Co-authored-by: Copilot <copilot@github.com>
// Installed Python packages, each in the format <name> or <name> (<version>). The version may be omitted if unknown. Returns an empty array if no packages are installed.
75
84
constresponse=[
76
85
'Below is a list of the Python packages, each in the format <name> or <name> (<version>). The version may be omitted if unknown: ',
@@ -90,7 +99,10 @@ export class GetEnvironmentInfoTool extends BaseTool<IResourceReference>
90
99
resourcePath,
91
100
token,
92
101
);
102
+
// Count lines starting with '- ' to get the number of packages
"failed": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"Whether there was a failure. Common to most of the events.", "owner": "donjayamanne" },
1995
-
"failureCategory": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"A reason that we generate (e.g. kerneldied, noipykernel, etc), more like a category of the error. Common to most of the events.", "owner": "donjayamanne" }
1995
+
"failureCategory": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"A reason that we generate (e.g. kerneldied, noipykernel, etc), more like a category of the error. Common to most of the events.", "owner": "donjayamanne" },
1996
+
"resolveOutcome": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"Which code path resolved the environment in configure_python_environment.", "owner": "donjayamanne" },
1997
+
"envType": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"The type of Python environment (e.g. venv, conda, system).", "owner": "donjayamanne" },
1998
+
"packageCount": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"Number of packages requested for installation (install_python_packages only).", "owner": "donjayamanne" },
1999
+
"installerType": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"Which installer was used: pip or conda (install_python_packages only).", "owner": "donjayamanne" },
2000
+
"responsePackageCount": {"classification":"SystemMetaData","purpose":"FeatureInsight","comment":"Number of packages in the environment response (get_python_environment_details only).", "owner": "donjayamanne" }
* Which code path resolved the environment (configure_python_environment only).
2019
+
*/
2020
+
resolveOutcome?: string;
2021
+
/**
2022
+
* The type of Python environment (e.g. venv, conda, system).
2023
+
*/
2024
+
envType?: string;
2025
+
/**
2026
+
* Number of packages requested for installation (install_python_packages only).
2027
+
*/
2028
+
packageCount?: string;
2029
+
/**
2030
+
* Which installer was used: pip or conda (install_python_packages only).
2031
+
*/
2032
+
installerType?: string;
2033
+
/**
2034
+
* Number of packages in the environment response (get_python_environment_details only).
2035
+
*/
2036
+
responsePackageCount?: string;
2012
2037
};
2013
2038
/**
2014
2039
* Telemetry event sent if and when user configure tests command. This command can be trigerred from multiple places in the extension. (Command palette, prompt etc.)
0 commit comments