Migrate vm-repair telemetry from Application Insights SDK to azure.cli.core telemetry pipeline, add PII scrubbing, pseudonymous user tracking, enriched VM context, and exception type tracking.#9894
Conversation
…nt tracking; add unit tests for telemetry functionality Co-authored-by: Copilot <copilot@github.com>
…ncies for version 2.3.0
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Migrates vm-repair telemetry from the Application Insights SDK to the Azure CLI telemetry pipeline, adding PII scrubbing and new unit tests around telemetry behavior.
Changes:
- Replace Application Insights
TelemetryClientusage withazure.cli.core.telemetry.add_extension_event. - Add PII scrubbing + pseudonymous user hash and pass additional telemetry context through command execution.
- Add pytest scaffolding and unit tests for telemetry helpers and event payload shaping.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vm-repair/setup.py | Bumps version and drops opencensus dependency in line with telemetry migration. |
| src/vm-repair/conftest.py | Adds global import-time module mocking to allow tests to run without Azure CLI installed. |
| src/vm-repair/azext_vm_repair/tests/latest/test_telemetry.py | Adds unit tests for PII scrubbing, user hash, and telemetry event construction. |
| src/vm-repair/azext_vm_repair/telemetry.py | Implements new telemetry pipeline integration, PII scrubbing, and context propagation. |
| src/vm-repair/azext_vm_repair/custom.py | Enriches telemetry context with VM properties + captures exception types. |
| src/vm-repair/azext_vm_repair/command_helper_class.py | Adds per-command telemetry context, user hash, and fixes telemetry dispatch flow. |
| src/vm-repair/HISTORY.rst | Documents release 2.3.0 changes. |
|
… in __del__, scrub PII in parameters/result_json
… macOS/other drives/case-insensitive
Migrate vm-repair telemetry from Application Insights SDK to azure.cli.core telemetry pipeline, add PII scrubbing, pseudonymous user tracking, enriched VM context, and exception type tracking.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
[az vm repair]
General Guidelines
azdev style [az vm repair]locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.