Buckets:
ktongue/docker_container / .vscode-server /extensions /ms-python.vscode-python-envs-1.22.0 /.github /prompts /add-telemetry.prompt.md
metadata
mode: agent
If the user does not specify an event name or properties, pick an informative and descriptive name for the telemetry event based on the task or feature. Add properties as you see fit to collect the necessary information to achieve the telemetry goal, ensuring they are relevant and useful for diagnostics or analytics.
When adding telemetry:
- If the user wants to record when an action is started (such as a command invocation), place the telemetry call at the start of the handler or function.
- If the user wants to record successful completions or outcomes, place the telemetry call at the end of the action, after the operation has succeeded (and optionally, record errors or failures as well).
Instructions to add a new telemetry event:
- Add a new event name to the
EventNamesenum insrc/common/telemetry/constants.ts. - Add a corresponding entry to the
IEventNamePropertyMappinginterface in the same file, including a GDPR comment and the expected properties. - In the relevant code location, call
sendTelemetryEventwith the new event name and required properties. Example:sendTelemetryEvent(EventNames.YOUR_EVENT_NAME, undefined, { property: value }); - If the event is triggered by a command, ensure the call is placed at the start of the command handler.
Expected output: The new event is tracked in telemetry and follows the GDPR and codebase conventions.
Xet Storage Details
- Size:
- 1.44 kB
- Xet hash:
- e41ff2286d6c2302ce0cb1f01f618541040451ec20504dc1e4275ebd56d8b7b3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.