@@ -101,6 +101,16 @@ export enum EventNames {
101101 * - hasPersistedSelection: boolean (whether a persisted env path existed in workspace state)
102102 */
103103 ENV_SELECTION_RESULT = 'ENV_SELECTION.RESULT' ,
104+ /**
105+ * Telemetry event fired when applyInitialEnvironmentSelection returns.
106+ * Duration measures the blocking time (excludes deferred global scope).
107+ * Properties:
108+ * - globalScopeDeferred: boolean (true = global scope fired in background, false = awaited)
109+ * - workspaceFolderCount: number (total workspace folders)
110+ * - resolvedFolderCount: number (folders that resolved with a non-undefined env)
111+ * - settingErrorCount: number (user-configured settings that could not be applied)
112+ */
113+ ENV_SELECTION_COMPLETED = 'ENV_SELECTION.COMPLETED' ,
104114 /**
105115 * Telemetry event fired when a lazily-registered manager completes its first initialization.
106116 * Replaces MANAGER_REGISTRATION_SKIPPED and MANAGER_REGISTRATION_FAILED for managers
@@ -122,6 +132,42 @@ export enum EventNames {
122132 * - duration: number (milliseconds taken for the CLI operation)
123133 */
124134 PET_JSON_CLI_FALLBACK = 'PET.JSON_CLI_FALLBACK' ,
135+ /**
136+ * Telemetry event for a PET refresh attempt (the core discovery RPC call).
137+ * Properties:
138+ * - result: 'success' | 'timeout' | 'error'
139+ * - envCount: number (environments returned via notifications)
140+ * - unresolvedCount: number (envs that needed follow-up resolve calls)
141+ * - workspaceDirCount: number (workspace directories sent in configure)
142+ * - searchPathCount: number (extra search paths sent in configure)
143+ * - attempt: number (0 = first try, 1 = retry)
144+ * - errorType: string (classified error category, on failure only)
145+ */
146+ PET_REFRESH = 'PET.REFRESH' ,
147+ /**
148+ * Telemetry event for a PET configure RPC call.
149+ * Properties:
150+ * - result: 'success' | 'timeout' | 'error' | 'skipped'
151+ * - workspaceDirCount: number
152+ * - envDirCount: number (environmentDirectories count)
153+ * - retryCount: number (consecutive timeout count from ConfigureRetryState)
154+ */
155+ PET_CONFIGURE = 'PET.CONFIGURE' ,
156+ /**
157+ * Telemetry event for PET process restart attempts.
158+ * Properties:
159+ * - attempt: number (1-based restart attempt number)
160+ * - result: 'success' | 'error'
161+ * - errorType: string (classified error category, on failure only)
162+ */
163+ PET_PROCESS_RESTART = 'PET.PROCESS_RESTART' ,
164+ /**
165+ * Telemetry event for PET resolve calls (single-env resolution).
166+ * Properties:
167+ * - result: 'success' | 'timeout' | 'error'
168+ * - errorType: string (classified error category, on failure only)
169+ */
170+ PET_RESOLVE = 'PET.RESOLVE' ,
125171}
126172
127173// Map all events to their properties
@@ -395,6 +441,21 @@ export interface IEventNamePropertyMapping {
395441 hasPersistedSelection : boolean ;
396442 } ;
397443
444+ /* __GDPR__
445+ "env_selection.completed": {
446+ "globalScopeDeferred": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
447+ "workspaceFolderCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
448+ "resolvedFolderCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
449+ "settingErrorCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" }
450+ }
451+ */
452+ [ EventNames . ENV_SELECTION_COMPLETED ] : {
453+ globalScopeDeferred : boolean ;
454+ workspaceFolderCount : number ;
455+ resolvedFolderCount : number ;
456+ settingErrorCount : number ;
457+ } ;
458+
398459 /* __GDPR__
399460 "manager.lazy_init": {
400461 "managerName": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
@@ -424,4 +485,68 @@ export interface IEventNamePropertyMapping {
424485 operation : 'refresh' | 'resolve' ;
425486 result : 'success' | 'error' ;
426487 } ;
488+
489+ /* __GDPR__
490+ "pet.refresh": {
491+ "result": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
492+ "envCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
493+ "unresolvedCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
494+ "workspaceDirCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
495+ "searchPathCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
496+ "attempt": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
497+ "errorType": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
498+ "<duration>": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" }
499+ }
500+ */
501+ [ EventNames . PET_REFRESH ] : {
502+ result : 'success' | 'timeout' | 'error' ;
503+ envCount ?: number ;
504+ unresolvedCount ?: number ;
505+ workspaceDirCount ?: number ;
506+ searchPathCount ?: number ;
507+ attempt : number ;
508+ errorType ?: string ;
509+ } ;
510+
511+ /* __GDPR__
512+ "pet.configure": {
513+ "result": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
514+ "workspaceDirCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
515+ "envDirCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
516+ "retryCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
517+ "<duration>": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" }
518+ }
519+ */
520+ [ EventNames . PET_CONFIGURE ] : {
521+ result : 'success' | 'timeout' | 'error' | 'skipped' ;
522+ workspaceDirCount ?: number ;
523+ envDirCount ?: number ;
524+ retryCount : number ;
525+ } ;
526+
527+ /* __GDPR__
528+ "pet.process_restart": {
529+ "attempt": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" },
530+ "result": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
531+ "errorType": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
532+ "<duration>": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" }
533+ }
534+ */
535+ [ EventNames . PET_PROCESS_RESTART ] : {
536+ attempt : number ;
537+ result : 'success' | 'error' ;
538+ errorType ?: string ;
539+ } ;
540+
541+ /* __GDPR__
542+ "pet.resolve": {
543+ "result": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
544+ "errorType": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "eleanorjboyd" },
545+ "<duration>": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "eleanorjboyd" }
546+ }
547+ */
548+ [ EventNames . PET_RESOLVE ] : {
549+ result : 'success' | 'timeout' | 'error' ;
550+ errorType ?: string ;
551+ } ;
427552}
0 commit comments