CmdID / az / az monitor / az monitor trace-association
az monitor trace-association create
Route the traces of a scope to an Azure Monitor workspace. Azure CLI reference
3 options Its page in the Azure CLI reference
Options
--azure-monitor-workspace, -wResource ID of the Azure Monitor workspace that receives the traces.--trace-metricsTrace-derived metrics if the workspace has no trace container yet.--trace-retention-daysDays to keep traces, from 4 to 730, if the workspace has no trace container yet.