Repository navigation
Conversation
…ontainer`: Add preview command groups for distributed traces Route distributed traces from an Application Insights component, resource group or subscription to an Azure Monitor workspace with one command, `az monitor trace-association create --resource-uri`. It creates the workspace's trace container first if it has none and never changes an existing one. Replacing the workspace of a resource group or subscription, and deleting its association, ask for confirmation. The commands use Microsoft.Monitor 2026-09-03-preview through AAZ models from Azure/aaz#1131. The per-scope association commands are generated as unregistered helpers that the --resource-uri commands dispatch to. `trace-container create` keeps the current value of settings it is not given. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3fea4286-bba0-4628-84dc-866644c2595b
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Contributor
|
Hi bragi92, |
This was referenced Oct 22, 2026
…and when settings conflict When explicit --trace-retention-days or --trace-metrics differ from the workspace's existing trace container, the error now says what the shared container keeps and recommends the exact `az monitor account trace-container update` command, or running without the flags. The container is still never changed by onboarding. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3fea4286-bba0-4628-84dc-866644c2595b
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This branch has not been deployed
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.
🤖 PR Validation —⚠️ Review suggested
Related command
az monitor trace-association create/show/list/deleteaz monitor account trace-container create/show/update/waitDescription
Adds preview commands for distributed traces in Azure Monitor, on
Microsoft.Monitor2026-09-03-preview.az monitor trace-association create --resource-uri <scope> --azure-monitor-workspace <workspace id>routes the traces of an Application Insights component, a resource group or a subscription to an Azure Monitor workspace. One command covers every scope;--resource-uripicks the API path.Enabledunless--trace-retention-daysor--trace-metricssay otherwise. An existing container is never changed, and explicit settings that differ from it fail.--yesskips it), because everything under that scope stops sending traces to the old workspace unless another association routes them there.showreturns the association at exactly the scope,listadds the inherited ones, anddeleteremoves only the scope's own association. Deleting at a resource group or subscription asks for confirmation; deleting where nothing is configured is a no-op.az monitor account trace-container create/show/update/waitmanage the workspace's trace container.createkeeps the current value of any setting it is not given, and uses the defaults above for a new container.Implementation notes:
--resource-uricommands dispatch to them.az monitor slionboarding: generated packages keep empty__init__.pyfiles for args-guided loading. Thetrace-container createoverride lives in theoperations/latesttree.Testing Guide
test_monitor_trace_scenario.py: two scenario tests, recorded live ineastus2euap. Trace containers and Application Insights trace associations are only created in regions with traces enabled, and canary regions get them first.test_monitor_unittest.py: unit tests for--resource-uriparsing, workspace ID validation and container settings.azdev linter monitorpasses. flake8 and pylint are clean on the changed files.History Notes
[Monitor]
az monitor trace-association: Add preview command group to route distributed traces from an Application Insights component, resource group or subscription to an Azure Monitor workspace[Monitor]
az monitor account trace-container: Add preview command group to manage the trace container of an Azure Monitor workspaceThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.