azure-sdk-for-python
azure-sdk-for-python copied to clipboard
Update workspace create to use new version of app insights
Make updates to the workspace create operation to make use of the new version of application insights (Log Analytics-based Application Insights). I have added the _app_insights_utils.py for most of the helper operations related to this. This mainly involves adding some information to templates being used and adds some deployments necessary to support this new version of application insights. The previously flow remains the same when a user brings their own app insights but now when creating app insights on the user's behalf we use the new version which requires log analytics workspace attached to the app insights resource.
The naming convention used for default resources to be created with the AzureML Workspace related to Application Insights will be as follows. This naming convention will be consistent between the following paths for creating AzureML workspaces, meaning that they will be reused as intended within subscription/region scope: Portal/Studio/SDK/CLI
"DefaultWorkspace-{location}" "DefaultResourceGroup-{location}"
Reasons for this change:
- Reduce manual changes necessary when new regions are introduced (by removing the regionMapping logic, which is only used for creating the name)
- Use simple, consistent naming pattern for default resources
- Remove dependency on external logic for regionMapping which is hard to track and not kept up to date.
Changes have also been made to update the workspace_keys _from_rest_object as it can cause null reference exceptions when no ACR existed for the workspace. Added None check and will return None for those credentials in that case instead of throwing an error.
Feature tracking this work in ADO https://dev.azure.com/msdata/Vienna/_workitems/edit/1912636/
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
- [ ] The pull request does not introduce [breaking changes]
- [ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
- [ ] I have read the contribution guidelines.
General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.