Skip to content
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

[MetricsAdvisor] Renamed MetricAnomalyAlertConfiguration to MetricAlertConfiguration #22116

Merged
merged 8 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Renamed class `ServicePrincipalDatasourceCredential` to `DataSourceServicePrincipal`.
- Renamed class `ServicePrincipalInKeyVaultDatasourceCredential` to `DataSourceServicePrincipalInKeyVault`.
- Renamed class `SqlConnectionStringDatasourceCredential` to `DataSourceSqlConnectionString`.
- Renamed class `MetricAnomalyAlertConfiguration` to `MetricAlertConfiguration`.
- Split the method `GetAnomalies` into two different methods: `GetAnomaliesForAlert` and `GetAnomaliesForDetectionConfiguration`.
- Split the method `GetIncidents` into two different methods: `GetIncidentsForAlert` and `GetIncidentsForDetectionConfiguration`.
- `DataFeedIngestionSettings` constructor now takes the required `ingestionStartTime` parameter. For this reason, the property `IngestionStartTime` is not nullable anymore.
Expand Down
2 changes: 1 addition & 1 deletion sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ AnomalyAlertConfiguration alertConfiguration = new AnomalyAlertConfiguration()
alertConfiguration.IdsOfHooksToAlert.Add(hookId);

var scope = MetricAnomalyAlertScope.GetScopeForWholeSeries();
var metricAlertConfiguration = new MetricAnomalyAlertConfiguration(anomalyDetectionConfigurationId, scope);
var metricAlertConfiguration = new MetricAlertConfiguration(anomalyDetectionConfigurationId, scope);

alertConfiguration.MetricAlertConfigurations.Add(metricAlertConfiguration);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public AnomalyAlertConfiguration() { }
public string Description { get { throw null; } set { } }
public string Id { get { throw null; } }
public System.Collections.Generic.IList<string> IdsOfHooksToAlert { get { throw null; } }
public System.Collections.Generic.IList<Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertConfiguration> MetricAlertConfigurations { get { throw null; } }
public System.Collections.Generic.IList<Azure.AI.MetricsAdvisor.Models.MetricAlertConfiguration> MetricAlertConfigurations { get { throw null; } }
public string Name { get { throw null; } set { } }
}
public partial class AnomalyDetectionConfiguration
Expand Down Expand Up @@ -1068,21 +1068,21 @@ internal IncidentRootCause() { }
public static bool operator !=(Azure.AI.MetricsAdvisor.Models.IngestionStatusType left, Azure.AI.MetricsAdvisor.Models.IngestionStatusType right) { throw null; }
public override string ToString() { throw null; }
}
public partial class MetricAnomalyAlertConditions
{
public MetricAnomalyAlertConditions() { }
public Azure.AI.MetricsAdvisor.Models.MetricBoundaryCondition MetricBoundaryCondition { get { throw null; } set { } }
public Azure.AI.MetricsAdvisor.Models.SeverityCondition SeverityCondition { get { throw null; } set { } }
}
public partial class MetricAnomalyAlertConfiguration
public partial class MetricAlertConfiguration
{
public MetricAnomalyAlertConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertScope alertScope) { }
public MetricAlertConfiguration(string detectionConfigurationId, Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertScope alertScope) { }
public Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertConditions AlertConditions { get { throw null; } set { } }
Copy link
Member

Choose a reason for hiding this comment

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

out of curiosity, what was the reason to drop the Anomaly from it? and why it happens to only that type and not the others like this one?

Copy link
Member Author

Choose a reason for hiding this comment

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

We're just aligning to what other languages are doing (.NET was the odd one out). We'll also rename MetricAnomalyAlertConditions to something else in another PR. Regarding other related models, changing them across languages is an effort with too low priority to be done in the current time frame.

public Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertScope AlertScope { get { throw null; } set { } }
public Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertSnoozeCondition AlertSnoozeCondition { get { throw null; } set { } }
public string DetectionConfigurationId { get { throw null; } set { } }
public bool? UseDetectionResultToFilterAnomalies { get { throw null; } set { } }
}
public partial class MetricAnomalyAlertConditions
{
public MetricAnomalyAlertConditions() { }
public Azure.AI.MetricsAdvisor.Models.MetricBoundaryCondition MetricBoundaryCondition { get { throw null; } set { } }
public Azure.AI.MetricsAdvisor.Models.SeverityCondition SeverityCondition { get { throw null; } set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct MetricAnomalyAlertConfigurationsOperator : System.IEquatable<Azure.AI.MetricsAdvisor.Models.MetricAnomalyAlertConfigurationsOperator>
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public GetAllFeedbackOptions()
}

/// <summary> The dimension filter. </summary>
internal FeedbackDimensionFilter DimensionFilter => Filter.Dimension == null ? null : new FeedbackDimensionFilter(Filter.Dimension);
internal FeedbackDimensionFilter DimensionFilter => Filter?.Dimension == null ? null : new FeedbackDimensionFilter(Filter.Dimension);
Copy link
Member Author

Choose a reason for hiding this comment

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

Added small fix for #22269.


/// <summary>
/// Filters the result by series. Only feedbacks for the series in the time series group specified will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public virtual Response<MetricFeedback> GetFeedback(string feedbackId, Cancellat
/// <summary>
/// Gets a collection of items describing the anomalies detected by a given <see cref="AnomalyDetectionConfiguration"/>.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
kinelski marked this conversation as resolved.
Show resolved Hide resolved
/// <param name="options">The set of options used to configure the request's behavior.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>An <see cref="AsyncPageable{T}"/> containing the collection of <see cref="DataPointAnomaly"/> instances.</returns>
Expand Down Expand Up @@ -866,7 +866,7 @@ async Task<Page<DataPointAnomaly>> NextPageFunc(string nextLink, int? pageSizeHi
/// <summary>
/// Gets a collection of items describing the anomalies detected by a given <see cref="AnomalyDetectionConfiguration"/>.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="options">The set of options used to configure the request's behavior.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>A <see cref="Pageable{T}"/> containing the collection of <see cref="DataPointAnomaly"/> instances.</returns>
Expand Down Expand Up @@ -925,7 +925,7 @@ Page<DataPointAnomaly> NextPageFunc(string nextLink, int? pageSizeHint)
/// <summary>
/// Gets a collection of items describing the incidents detected by a given <see cref="AnomalyDetectionConfiguration"/>.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="options">The set of options used to configure the request's behavior.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>An <see cref="AsyncPageable{T}"/> containing the collection of <see cref="DataPointAnomaly"/> instances.</returns>
Expand Down Expand Up @@ -985,7 +985,7 @@ async Task<Page<AnomalyIncident>> NextPageFunc(string nextLink, int? pageSizeHin
/// <summary>
/// Gets a collection of items describing the incidents detected by a given <see cref="AnomalyDetectionConfiguration"/>.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="options">The set of options used to configure the request's behavior.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>A <see cref="Pageable{T}"/> containing the collection of <see cref="DataPointAnomaly"/> instances.</returns>
Expand Down Expand Up @@ -1045,7 +1045,7 @@ Page<AnomalyIncident> NextPageFunc(string nextLink, int? pageSizeHint)
/// <summary>
/// Gets the suggestions for likely root causes of an incident.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="incidentId">The unique identifier of the <see cref="AnomalyIncident"/>.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>An <see cref="AsyncPageable{T}"/> containing the collection of <see cref="IncidentRootCause"/>s.</returns>
Expand Down Expand Up @@ -1081,7 +1081,7 @@ async Task<Page<IncidentRootCause>> FirstPageFunc(int? pageSizeHint)
/// <summary>
/// Gets the suggestions for likely root causes of an incident.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="incidentId">The unique identifier of the <see cref="AnomalyIncident"/>.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
/// <returns>A <see cref="Pageable{T}"/> containing the collection of <see cref="IncidentRootCause"/>s.</returns>
Expand Down Expand Up @@ -1184,9 +1184,9 @@ Page<IncidentRootCause> FirstPageFunc(int? pageSizeHint)

/// <summary>
/// Gets all the values a specified dimension has assumed for anomalous data points detected by a
/// <see cref="MetricAnomalyAlertConfiguration"/>.
/// <see cref="AnomalyAlertConfiguration"/>.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="dimensionName">The name of the dimension.</param>
/// <param name="options">The set of options used to configure the request's behavior.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
Expand Down Expand Up @@ -1246,9 +1246,9 @@ async Task<Page<string>> NextPageFunc(string nextLink, int? pageSizeHint)

/// <summary>
/// Gets all the values a specified dimension has assumed for anomalous data points detected by a
/// <see cref="MetricAnomalyAlertConfiguration"/>.
/// <see cref="AnomalyAlertConfiguration"/>.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="dimensionName">The name of the dimension.</param>
/// <param name="options">The set of options used to configure the request's behavior.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
Expand Down Expand Up @@ -1309,7 +1309,7 @@ Page<string> NextPageFunc(string nextLink, int? pageSizeHint)
/// <summary>
/// Query series enriched by anomaly detection.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="seriesKeys">The detection series keys.</param>
/// <param name="startTime">Filters the result. Only data points after this point in time, in UTC, will be returned.</param>
/// <param name="endTime">Filters the result. Only data points after this point in time, in UTC, will be returned.</param>
Expand Down Expand Up @@ -1349,7 +1349,7 @@ async Task<Page<MetricEnrichedSeriesData>> FirstPageFunc(int? pageSizeHint)
/// <summary>
/// Query series enriched by anomaly detection.
/// </summary>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="MetricAnomalyAlertConfiguration"/>.</param>
/// <param name="detectionConfigurationId">The unique identifier of the <see cref="AnomalyAlertConfiguration"/>.</param>
/// <param name="seriesKeys">The detection series keys.</param>
/// <param name="startTime">Filters the result. Only data points after this point in time, in UTC, will be returned.</param>
/// <param name="endTime">Filters the result. Only data points after this point in time, in UTC, will be returned.</param>
Expand Down
Loading