Skip to content

[Monitor] Update query package to use TypeSpec - #42205

Merged
Paul Van Eck (pvaneck) merged 3 commits into
Azure:mainfrom
pvaneck:monitor-query-typespec-patch
Jul 29, 2025
Merged

[Monitor] Update query package to use TypeSpec#42205
Paul Van Eck (pvaneck) merged 3 commits into
Azure:mainfrom
pvaneck:monitor-query-typespec-patch

Conversation

@pvaneck

@pvaneck Paul Van Eck (pvaneck) commented Jul 24, 2025

Copy link
Copy Markdown
Member
  • MetricsClient and MetricsQueryClient have been removed from the azure-monitor-query package. This is part of the migration to split logs and metrics functionality into separate packages and using TypeSpec as the generation tooling for this SDK.
    • The MetricsClient has been moved to the new azure-monitor-querymetrics package.
    • Functionality provided by MetricsQueryClient can be access through the azure-mgmt-monitor package.
    • All metrics-related content has been removed.
    • The package version has been updated to 2.0.0 due to the breaking changes.

@github-actions github-actions Bot added the Monitor Monitor, Monitor Ingestion, Monitor Query label Jul 24, 2025
@github-actions

github-actions Bot commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-monitor-query

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.

Pull Request Overview

This PR updates the Azure Monitor Query package to use TypeSpec for code generation, replacing the previous Autorest-based generation. The primary purpose is to modernize the code generation pipeline while maintaining compatibility and functionality for logs querying capabilities.

Key changes:

  • Migration from Autorest to TypeSpec code generation
  • Updates to Python version requirements (minimum Python 3.9)
  • Removal of metrics-related functionality (clients, tests, and samples)

Reviewed Changes

Copilot reviewed 120 out of 120 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsp-location.yaml Specifies TypeSpec source location and commit for code generation
setup.py Updates package metadata, dependencies, and Python version requirements
swagger/README.md Removes Autorest configuration (replaced by TypeSpec)
tests/ Removes all metrics-related test files and updates logs test imports
samples/ Removes metrics-related samples and updates pylint directives
azure/monitor/query/ Regenerated models, client code, and configurations using TypeSpec

Comment thread sdk/monitor/azure-monitor-query/setup.py
Comment thread sdk/monitor/azure-monitor-query/azure/monitor/query/_version.py
Comment thread sdk/monitor/azure-monitor-query/tests/test_logs_timespans.py
Comment thread sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_patch.py
This removes Metrics-related code/content and converts this package to
be for logs querying only.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
@pvaneck
Paul Van Eck (pvaneck) force-pushed the monitor-query-typespec-patch branch from 34baeca to d989633 Compare July 29, 2025 18:06
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>

@lmazuel Laurent Mazuel (lmazuel) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Trust base approval :)

@pvaneck
Paul Van Eck (pvaneck) merged commit 427c5ec into Azure:main Jul 29, 2025
19 checks passed
@pvaneck
Paul Van Eck (pvaneck) deleted the monitor-query-typespec-patch branch July 29, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor Monitor, Monitor Ingestion, Monitor Query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants