-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Generate .NET SDK for Microsoft.Insights metric alerts 2024-03-01-preview #53566
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
Generate .NET SDK for Microsoft.Insights metric alerts 2024-03-01-preview #53566
Conversation
…w/metricAlert_API.json
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this 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 Metric Alerts API from the stable 2018-03-01 version to the preview 2024-03-01-preview version. The update introduces support for PromQL-based query alert rules and makes several breaking changes to the API.
- Updates API version from
2018-03-01to2024-03-01-preview - Adds new PromQL criteria types (
PromQLCriteria,StaticPromQLCriteria,DynamicPromQLCriteria) for Prometheus-based alerting - Adds support for managed service identity, custom properties, action properties, and resolve configuration
- Changes
WindowSizefrom required to optional inMetricAlertDataconstructor - Updates all example references in test samples to use the new API version
Reviewed Changes
Copilot reviewed 5 out of 56 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| autorest.md | Updates API specification reference to preview version |
| MetricAlertsRestOperations.cs | Updates default API version constant |
| MetricAlertsStatusRestOperations.cs | Updates default API version constant |
| MetricAlertData.cs | Changes constructor signature to make WindowSize optional, adds new properties |
| MetricAlertData.Serialization.cs | Updates serialization to handle WindowSize as nullable, adds new properties |
| MetricAlertPatch.cs | Adds identity, resolve configuration, custom properties, and action properties |
| Various Models | Adds new PromQL criteria classes and supporting models |
| Sample files | Updates example references to preview API version, demonstrates new PromQL functionality |
| API surface files | Reflects all public API changes including breaking changes |
| ApiCompatBaseline.txt | Documents breaking change for WindowSize property |
| Customized/MetricAlertData.cs | Adds overload constructor to maintain backward compatibility |
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.