Skip to content

[Monitor] Update query package to use TypeSpec #42205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 29, 2025

Conversation

pvaneck
Copy link
Member

@pvaneck pvaneck commented Jul 24, 2025

  • 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
Copy link

github-actions bot commented Jul 24, 2025

API Change Check

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

azure-monitor-query

@pvaneck pvaneck force-pushed the monitor-query-typespec-patch branch 2 times, most recently from 8755b5d to 34baeca Compare July 26, 2025 01:09
@pvaneck pvaneck marked this pull request as ready for review July 26, 2025 01:09
@Copilot Copilot AI review requested due to automatic review settings July 26, 2025 01:09
@pvaneck pvaneck requested a review from a team as a code owner July 26, 2025 01:09
Copy link
Contributor

@Copilot Copilot AI left a comment

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

This removes Metrics-related code/content and converts this package to
be for logs querying only.

Signed-off-by: Paul Van Eck <[email protected]>
@pvaneck pvaneck force-pushed the monitor-query-typespec-patch branch from 34baeca to d989633 Compare July 29, 2025 18:06
pvaneck added 2 commits July 29, 2025 18:11
Signed-off-by: Paul Van Eck <[email protected]>
Signed-off-by: Paul Van Eck <[email protected]>
Copy link
Member

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

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

Trust base approval :)

@pvaneck pvaneck merged commit 427c5ec into Azure:main Jul 29, 2025
19 checks passed
@pvaneck 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.

2 participants