Skip to content

{Monitor} Add cloud endpoint and credential scope mappings - #10400

Merged
Julie Zhu (yanzhudd) merged 4 commits into
Azure:mainfrom
william051200:fix-log-analytics
Sep 29, 2026
Merged

Julie Zhu (yanzhudd) merged 4 commits into
Azure:mainfrom
william051200:fix-log-analytics

Conversation

@william051200

Copy link
Copy Markdown
Member
  • Add explicit host fallbacks for Azure Government and Azure China.
  • Use cloud-specific credential scopes to avoid requesting public Azure tokens in clouds.
  • Add regression tests - test_cloud_host_template_fallbacks, test_cloud_specific_credential_scopes

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az monitor log-analytics query

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install azdev required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Handle missing endpoints for unmapped clouds to avoid an AttributeError.

Review effort: Lite
Findings: None

What changed in this PR

Adds Azure sovereign-cloud endpoint fallbacks and cloud-specific credential scopes for Log Analytics queries.

Changes:

  • Adds Government and China host and credential mappings.
  • Adds regression tests and refreshes recordings.
  • Bumps version and updates release notes.
File Summary
src/​log-analytics/​setup.py Bumps extension version.
src/​log-analytics/​HISTORY.rst Documents the changes.
src/​log-analytics/​azext_loganalytics/​tests/​latest/​test_loganalytics_client.py Adds endpoint and scope tests.
src/​log-analytics/​azext_loganalytics/​tests/​latest/​recordings/​test_query.yaml Refreshes query recordings.
src/​log-analytics/​azext_loganalytics/​aaz/​latest/​_clients.py Implements cloud-specific endpoints and scopes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@yonzhan

Copy link
Copy Markdown
Collaborator

Monitor

@yanzhudd
Julie Zhu (yanzhudd) merged commit 7bb478d into Azure:main Sep 29, 2026
44 checks passed
@william051200
William (william051200) deleted the fix-log-analytics branch September 29, 2026 01:38
@azclibot

Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ log-analytics-1.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=183261596&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants