Add ELM tasks to RequiredForTelemetry allowlist#5543
Open
aasim wants to merge 2 commits into
Open
Conversation
|
Azure Pipelines: 1 pipeline(s) require an authorized user to comment /azp run to run. |
|
Azure Pipelines: 1 pipeline(s) require an authorized user to comment /azp run to run. |
tarunramsinghani
approved these changes
Apr 30, 2026
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
|
Merged - #5547 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The 1ES Enterprise Live Migration (ELM) feature orchestrates Azure DevOps → Azure DevOps repository migrations. It runs two first-party Microsoft tasks (
ElmPrecheckTaskandElmRepoSyncTask) inside a dynamic pipeline. These tasks emit##vso[telemetry.publish]events for client-side policy results (RepoSizePolicy,PushPackSizePolicy,MaxFileSizePolicy,RefNamePolicy), per-migration outcomes, and SLA-relevant timing data.Today none of that telemetry reaches Customer Intelligence. The
PublishTelemetryCommandinTelemetryCommandExtension.cssilently drops events from any task whoseTaskStep.IsServerOwnedis nottrueand whose ID is not inWellKnownTasks.RequiredForTelemetry. The Advanced Security task family solved this exact problem by adding their task IDs to the same allowlist (seeMicrosoftExtensionTaskIds.AdvancedSecurity*entries).ADO Work Item: AB#
Description
Adds the two ELM task GUIDs to
WellKnownTasks.MicrosoftExtensionTaskIdsand appends them to theRequiredForTelemetrylist inConstants.cs:ElmPrecheckTask—95f6d7c1-6cc0-47c2-944c-6172489de134ElmRepoSyncTask—3a0763a8-1b93-4553-a749-947a21c45b3fPublisher:
enterpriselivemigration(Microsoft-signed first-party extension).Risk Assessment (Low)
Two GUID entries appended to a hardcoded allowlist. No control flow changes, no new code paths, no behavior change for any task already on the list or for tasks not on it. Identical pattern to the prior Advanced Security additions, which have been in production for multiple agent releases without incident. Backward compatible — older agents simply continue to drop ELM telemetry as they do today.
Unit Tests Added or Updated (No)
Existing tests in
TelemetryCommandExtensionTests.cs(PublishTelemetryCommandForInBoxTask,PublishTelemetryCommandForCustomerTask) cover the gating logic generically. The Advanced Security additions also did not add per-task tests for the same reason — the behavior under test is the allowlist mechanism, not the contents of the list.Additional Testing Performed
git diffproduces only the intended additions inConstants.cs.cluster('vso').database('VSO').ClientTracefiltered onArea == "EnterpriseLiveMigration"and confirmingElmPrecheckTask/ElmRepoSyncTaskevents appear with the expected payload (repositoryId,migrationId, policy pass/fail counts).tasks/ElmPrecheckTask/task.jsonandtasks/ElmRepoSyncTask/task.jsonin theenterprise-live-migration-tasksrepo.Change Behind Feature Flag (No)
Allowlist entries are static
Guidvalues consumed at agent startup. The existing entries (Google Play, App Store, Advanced Security) are also not flagged. Adding a feature flag would require restructuringWellKnownTasks.RequiredForTelemetryfrom a static list to a runtime-evaluated collection — out of scope and inconsistent with established convention.Tech Design / Approach
TaskStep.IsServerOwned = truefrom the AzureDevOps server-side dynamic-pipeline generator. That path requires an mseng change, server deployment, and ties the gate to internal orchestration code. The allowlist approach is public, reviewable, and auditable.Documentation Changes Required (No)
The
RequiredForTelemetrylist is not part of any external API or user-facing surface. The two added GUIDs match what is already documented in the ELM task definitions.Logging Added/Updated (No)
No log statements added or modified. The agent already logs telemetry publish attempts at trace level via the existing
PublishTelemetryCommandplumbing.Telemetry Added/Updated (Yes)
This change is the enabler for telemetry. The actual telemetry events are emitted by the ELM tasks themselves (in the
enterprise-live-migration-tasksrepo) under areaEnterpriseLiveMigrationwith featuresElmPrecheckandElmRepoSync. Payload includes:repositoryId,migrationId(correlation keys)statusandmessagetotalPolicies,passedPolicies,failedPoliciescountersEvents will be visible in
ClientTraceandCustomerIntelligencetables on thevsoKusto cluster after agent rollout. Validation query is prepared and will be run against staging migrations first.Rollback Scenario and Process (Yes)
Rollback is a single-commit revert that removes the two GUIDs from the list. No data migration, no schema change, no dependency to unwind. Agents on the unrolled-back version simply revert to dropping ELM telemetry — same behavior as today. Rollback can be cherry-picked into a hotfix release if needed.
Dependency Impact Assessed and Regression Tested (Yes)
Single-file change in
Microsoft.VisualStudio.Services.Agent. No other agent component readsRequiredForTelemetryfor any purpose other than the telemetry gate atTaskRunner.IsTelemetryPublishRequired()and thePublishTelemetryCommand.Executeearly-return. No third-party dependencies touched. Existing CI builds and L0 test suite cover the surrounding code.