Skip to content

Commit 0daafe7

Browse files
committed
implement json mode
1 parent d9e2031 commit 0daafe7

File tree

3 files changed

+818
-32
lines changed

3 files changed

+818
-32
lines changed

src/common/telemetry/constants.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ export enum EventNames {
113113
* - errorType: string (classified error category, on failure only)
114114
*/
115115
MANAGER_LAZY_INIT = 'MANAGER.LAZY_INIT',
116+
/**
117+
* Telemetry event fired when the JSON CLI fallback is used for environment discovery.
118+
* Triggered when the PET JSON-RPC server mode is exhausted after all restart attempts.
119+
* Properties:
120+
* - operation: 'refresh' | 'resolve'
121+
* - result: 'success' | 'error'
122+
* - duration: number (milliseconds taken for the CLI operation)
123+
*/
124+
PET_JSON_CLI_FALLBACK = 'PET.JSON_CLI_FALLBACK',
116125
}
117126

118127
// Map all events to their properties
@@ -403,4 +412,16 @@ export interface IEventNamePropertyMapping {
403412
toolSource: string;
404413
errorType?: string;
405414
};
415+
416+
/* __GDPR__
417+
"pet.json_cli_fallback": {
418+
"operation": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "StellaHuang95" },
419+
"result": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "StellaHuang95" },
420+
"<duration>": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "StellaHuang95" }
421+
}
422+
*/
423+
[EventNames.PET_JSON_CLI_FALLBACK]: {
424+
operation: 'refresh' | 'resolve';
425+
result: 'success' | 'error';
426+
};
406427
}

0 commit comments

Comments
 (0)