From 9bbe331384ac4152c3dc5e693d834395007c3b5b Mon Sep 17 00:00:00 2001 From: Caio Saldanha Date: Thu, 24 Jun 2021 11:42:41 -0700 Subject: [PATCH] [MetricsAdvisor] Updated DimensionKey implementation (#21972) --- .../Azure.AI.MetricsAdvisor/CHANGELOG.md | 11 + .../Azure.AI.MetricsAdvisor/README.md | 4 +- .../Azure.AI.MetricsAdvisor.netstandard2.0.cs | 32 +- .../src/GetAllFeedbackOptions.cs | 5 +- .../src/GetAnomalyDimensionValuesOptions.cs | 3 +- .../MetricSeriesGroupDetectionCondition.cs | 11 +- .../MetricSingleSeriesDetectionCondition.cs | 11 +- .../MetricFeedback/FeedbackDimensionFilter.cs | 5 +- .../src/Models/TimeSeries/DimensionKey.cs | 107 ++---- .../AnomalyAlertConfigurationLiveTests.cs | 4 +- .../AnomalyDetectionConfigurationLiveTests.cs | 58 ++- .../AnomalyDetectionLiveTests.cs | 57 ++- .../AnomalyDetectionTests.cs | 8 +- .../MetricFeedbackLiveTests.cs | 84 +++-- .../TimeSeriesLiveTests.cs | 42 ++- .../tests/MetricsAdvisorLiveTestBase.cs | 56 +-- .../tests/Models/DimensionKeyTests.cs | 88 +++++ .../Sample07_QueryDetectedAnomalies.cs | 8 +- .../Sample08_QueryIncidentsAndRootCauses.cs | 22 +- .../Sample09_QueryTimeSeriesInformation.cs | 42 ++- .../Sample10_FeedbackCrudOperations.cs | 12 +- ...tionConfigurationWithSeriesConditions.json | 211 ++++------- ...onfigurationWithSeriesConditionsAsync.json | 211 ++++------- ...onfigurationWithSeriesGroupConditions.json | 210 ++++------- ...urationWithSeriesGroupConditionsAsync.json | 210 ++++------- ...nConfigurationWithMinimumSetup(False).json | 250 +++++------- ...igurationWithMinimumSetup(False)Async.json | 250 +++++------- ...onConfigurationWithMinimumSetup(True).json | 250 +++++------- ...figurationWithMinimumSetup(True)Async.json | 250 +++++------- ...imensionValuesWithMinimumSetup(False).json | 24 +- ...ionValuesWithMinimumSetup(False)Async.json | 24 +- ...DimensionValuesWithMinimumSetup(True).json | 24 +- ...sionValuesWithMinimumSetup(True)Async.json | 24 +- .../GetMetricEnrichedSeriesData(False).json | 356 ++++++++++++++---- ...tMetricEnrichedSeriesData(False)Async.json | 356 ++++++++++++++---- .../GetMetricEnrichedSeriesData(True).json | 356 ++++++++++++++---- ...etMetricEnrichedSeriesData(True)Async.json | 356 ++++++++++++++---- .../GetMetricSeriesData(False).json | 89 ++++- .../GetMetricSeriesData(False)Async.json | 89 ++++- .../GetMetricSeriesData(True).json | 89 ++++- .../GetMetricSeriesData(True)Async.json | 89 ++++- 41 files changed, 2559 insertions(+), 1829 deletions(-) create mode 100644 sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Models/DimensionKeyTests.cs diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md index 5dfb122cbe7a7..c7ef30ab6ad72 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/CHANGELOG.md @@ -2,7 +2,15 @@ ## 1.0.0-beta.5 (Unreleased) +### New Features +- `DimensionKey` now implements the `IEnumerable>` interface. Dimension columns can now be enumerated. +- Added method `Contains` to `DimensionKey` to check whether or not a dimension column is present. +- Added a property setter to `MetricSeriesGroupDetectionCondition.SeriesGroupKey` and to `MetricSingleSeriesDetectionCondition.SeriesKey`. + ### Breaking Changes +- Removed methods `AddDimensionColumn` and `RemoveDimensionColumn` from `DimensionKey`. In order to access elements, the new method `TryGetValue` must be used. Once the instance has been created, the columns can't be modified anymore. +- `DimensionKey` is not an `IEquatable` anymore. Equality will be calculated based on reference only. +- `DimensionKey` constructor now takes the required `dimension` parameter. - The whole `DatasourceCredential` API has been renamed to `DataSourceCredential`. This includes renames in methods, method parameters, and properties. - Renamed class `DatasourceCredential` to `DataSourceCredentialEntity`. - Renamed class `DataLakeGen2SharedKeyDatasourceCredential` to `DataSourceDataLakeGen2SharedKey`. @@ -15,6 +23,8 @@ - `DataFeedMissingDataPointFillSettings` constructor now takes the required `fillType` parameter. For this reason, the property `FillType` is not nullable anymore. - `EmailNotificationHook` constructor now takes the required `name` parameter. - `WebNotificationHook` constructor now takes the required `name` and `endpoint` parameters. +- `MetricSeriesGroupDetectionCondition` constructor now takes the required `seriesGroupKey` parameter. +- `MetricSingleSeriesDetectionCondition` constructor now takes the required `seriesKey` parameter. - In `MetricSeriesData`, removed the `Definition` property. Now, properties `MetricId` and `SeriesKey` can be accessed directly from `MetricSeriesData`. - In `DataPointAnomaly`, renamed property `AnomalyDetectionConfigurationId` to `DetectionConfigurationId`. - In `DataFeedMetric`, renamed constructor parameter `metricName` to `name` only. @@ -23,6 +33,7 @@ - Moved `DatasourceCredential`, `DataFeedSource`, `NotificationHook`, and all of their concrete child types to the `Azure.AI.MetricsAdvisor.Administration` namespace. - Moved `MetricFeedback` and all of its concrete child types to the `Azure.AI.MetricsAdvisor` namespace. - Changed order of parameters of `MetricsAdvisorClient.GetMetricEnrichedSeriesData`. Now, `detectionConfigurationId` appears first. +- Optional properties `GetAllFeedbackOptions.Filter`, `GetAnomalyDimensionValuesOptions.DimensionToFilter`, and `FeedbackDimensionFilter.DimensionFilter` must now be manually added with setters to be used. - Moved property `DataFeed.SourceType` to `DataFeedSource.DataSourceType`. - In `MetricsAdvisorKeyCredential`, merged `UpdateSubscriptionKey` and `UpdateApiKey` into a single method, `Update`, to make it an atomic operation. diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md index cbf263869a55b..249199930274a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/README.md @@ -415,9 +415,9 @@ await foreach (DataPointAnomaly anomaly in client.GetAnomaliesForAlertAsync(aler Console.WriteLine($"Severity: {anomaly.Severity}"); Console.WriteLine("Series key:"); - foreach (KeyValuePair keyValuePair in anomaly.SeriesKey.AsDictionary()) + foreach (KeyValuePair dimensionColumn in anomaly.SeriesKey) { - Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); + Console.WriteLine($" Dimension '{dimensionColumn.Key}': {dimensionColumn.Value}"); } Console.WriteLine(); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs index 6850e59b21c67..47f2b0a1a697a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/api/Azure.AI.MetricsAdvisor.netstandard2.0.cs @@ -51,7 +51,7 @@ public partial class GetAllFeedbackOptions public GetAllFeedbackOptions() { } public System.DateTimeOffset? EndTime { get { throw null; } set { } } public Azure.AI.MetricsAdvisor.Models.FeedbackType? FeedbackType { get { throw null; } set { } } - public Azure.AI.MetricsAdvisor.Models.DimensionKey Filter { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.DimensionKey Filter { get { throw null; } set { } } public int? MaxPageSize { get { throw null; } set { } } public int? Skip { get { throw null; } set { } } public System.DateTimeOffset? StartTime { get { throw null; } set { } } @@ -83,7 +83,7 @@ public GetAnomaliesForDetectionConfigurationOptions(System.DateTimeOffset startT public partial class GetAnomalyDimensionValuesOptions { public GetAnomalyDimensionValuesOptions(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { } - public Azure.AI.MetricsAdvisor.Models.DimensionKey DimensionToFilter { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.DimensionKey DimensionToFilter { get { throw null; } set { } } public System.DateTimeOffset EndTime { get { throw null; } } public int? MaxPageSize { get { throw null; } set { } } public int? Skip { get { throw null; } set { } } @@ -988,19 +988,13 @@ internal DataPointAnomaly() { } public static bool operator !=(Azure.AI.MetricsAdvisor.Models.DetectionConditionsOperator left, Azure.AI.MetricsAdvisor.Models.DetectionConditionsOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class DimensionKey : System.IEquatable + public partial class DimensionKey : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable { - public DimensionKey() { } - public void AddDimensionColumn(string dimensionColumnName, string dimensionColumnValue) { } - public System.Collections.Generic.Dictionary AsDictionary() { throw null; } - public bool Equals(Azure.AI.MetricsAdvisor.Models.DimensionKey other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.MetricsAdvisor.Models.DimensionKey left, Azure.AI.MetricsAdvisor.Models.DimensionKey right) { throw null; } - public static bool operator !=(Azure.AI.MetricsAdvisor.Models.DimensionKey left, Azure.AI.MetricsAdvisor.Models.DimensionKey right) { throw null; } - public void RemoveDimensionColumn(string dimensionColumnName) { } + public DimensionKey(System.Collections.Generic.IEnumerable> dimension) { } + public bool Contains(string columnName) { throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + public bool TryGetValue(string columnName, out string value) { throw null; } } public partial class EnrichmentStatus { @@ -1012,7 +1006,7 @@ internal EnrichmentStatus() { } public partial class FeedbackDimensionFilter { public FeedbackDimensionFilter() { } - public Azure.AI.MetricsAdvisor.Models.DimensionKey DimensionFilter { get { throw null; } } + public Azure.AI.MetricsAdvisor.Models.DimensionKey DimensionFilter { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct FeedbackType : System.IEquatable @@ -1181,13 +1175,13 @@ internal MetricSeriesDefinition() { } } public partial class MetricSeriesGroupDetectionCondition : Azure.AI.MetricsAdvisor.Models.MetricWholeSeriesDetectionCondition { - public MetricSeriesGroupDetectionCondition() { } - public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesGroupKey { get { throw null; } } + public MetricSeriesGroupDetectionCondition(Azure.AI.MetricsAdvisor.Models.DimensionKey seriesGroupKey) { } + public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesGroupKey { get { throw null; } set { } } } public partial class MetricSingleSeriesDetectionCondition : Azure.AI.MetricsAdvisor.Models.MetricWholeSeriesDetectionCondition { - public MetricSingleSeriesDetectionCondition() { } - public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesKey { get { throw null; } } + public MetricSingleSeriesDetectionCondition(Azure.AI.MetricsAdvisor.Models.DimensionKey seriesKey) { } + public Azure.AI.MetricsAdvisor.Models.DimensionKey SeriesKey { get { throw null; } set { } } } public partial class MetricWholeSeriesDetectionCondition { diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs index 0dc9129eafe19..2dadd44a30fc3 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAllFeedbackOptions.cs @@ -17,17 +17,16 @@ public class GetAllFeedbackOptions /// public GetAllFeedbackOptions() { - Filter = new DimensionKey(); } /// The dimension filter. - internal FeedbackDimensionFilter DimensionFilter => Filter.Dimension.Count == 0 ? null : new FeedbackDimensionFilter(Filter.Dimension); + internal FeedbackDimensionFilter DimensionFilter => Filter.Dimension == null ? null : new FeedbackDimensionFilter(Filter.Dimension); /// /// Filters the result by series. Only feedbacks for the series in the time series group specified will /// be returned. /// - public DimensionKey Filter { get; } + public DimensionKey Filter { get; set; } /// /// Filters the result by . diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAnomalyDimensionValuesOptions.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAnomalyDimensionValuesOptions.cs index dbb61e2a81d74..9dff0643d54be 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAnomalyDimensionValuesOptions.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/GetAnomalyDimensionValuesOptions.cs @@ -21,7 +21,6 @@ public GetAnomalyDimensionValuesOptions(DateTimeOffset startTime, DateTimeOffset { StartTime = startTime; EndTime = endTime; - DimensionToFilter = new DimensionKey(); } /// @@ -38,7 +37,7 @@ public GetAnomalyDimensionValuesOptions(DateTimeOffset startTime, DateTimeOffset /// Filters the result by series. Only anomalies detected in the time series group specified will /// be returned. /// - public DimensionKey DimensionToFilter { get; } + public DimensionKey DimensionToFilter { get; set; } /// /// If set, skips the first set of items returned. This property specifies the amount of items to diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSeriesGroupDetectionCondition.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSeriesGroupDetectionCondition.cs index 2fc7ff8860667..9b3b297b62642 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSeriesGroupDetectionCondition.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSeriesGroupDetectionCondition.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using Azure.Core; namespace Azure.AI.MetricsAdvisor.Models @@ -16,9 +17,13 @@ public partial class MetricSeriesGroupDetectionCondition : MetricWholeSeriesDete /// /// Initializes a new instance of the class. /// - public MetricSeriesGroupDetectionCondition() + /// The key that identifies the group of time series to which these conditions apply within a metric. A subset of the possible dimensions of the associated data feed must be set. + /// is null. + public MetricSeriesGroupDetectionCondition(DimensionKey seriesGroupKey) { - SeriesGroupKey = new DimensionKey(); + Argument.AssertNotNull(seriesGroupKey, nameof(seriesGroupKey)); + + SeriesGroupKey = seriesGroupKey; } /// @@ -26,6 +31,6 @@ public MetricSeriesGroupDetectionCondition() /// A subset of the possible dimensions of the associated data feed must be set. /// [CodeGenMember("Group")] - public DimensionKey SeriesGroupKey { get; } + public DimensionKey SeriesGroupKey { get; set; } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSingleSeriesDetectionCondition.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSingleSeriesDetectionCondition.cs index 81b0eb525fc2e..51adb182d4e4d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSingleSeriesDetectionCondition.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/AnomalyDetection/MetricSingleSeriesDetectionCondition.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using Azure.Core; namespace Azure.AI.MetricsAdvisor.Models @@ -16,9 +17,13 @@ public partial class MetricSingleSeriesDetectionCondition : MetricWholeSeriesDet /// /// Initializes a new instance of the class. /// - public MetricSingleSeriesDetectionCondition() + /// The key that uniquely identifies the time series to which these conditions apply within a metric. Every dimension contained in the associated must be assigned a value. + /// is null. + public MetricSingleSeriesDetectionCondition(DimensionKey seriesKey) { - SeriesKey = new DimensionKey(); + Argument.AssertNotNull(seriesKey, nameof(seriesKey)); + + SeriesKey = seriesKey; } internal MetricSingleSeriesDetectionCondition(DetectionConditionsOperator? crossConditionsOperator, SmartDetectionCondition smartDetectionCondition, HardThresholdCondition hardThresholdCondition, ChangeThresholdCondition changeThresholdCondition, SeriesIdentity series) @@ -31,7 +36,7 @@ internal MetricSingleSeriesDetectionCondition(DetectionConditionsOperator? cross /// The key that uniquely identifies the time series to which these conditions apply within a metric. /// Every dimension contained in the associated must be assigned a value. /// - public DimensionKey SeriesKey { get; } + public DimensionKey SeriesKey { get; set; } /// /// Used by CodeGen during serialization. diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricFeedback/FeedbackDimensionFilter.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricFeedback/FeedbackDimensionFilter.cs index 429a45e3c3526..4f1e4c241dd4b 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricFeedback/FeedbackDimensionFilter.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/MetricFeedback/FeedbackDimensionFilter.cs @@ -16,7 +16,6 @@ public partial class FeedbackDimensionFilter /// public FeedbackDimensionFilter() { - DimensionFilter = new DimensionKey(); } /// Initializes a new instance of FeedbackDimensionFilter. @@ -36,14 +35,14 @@ internal FeedbackDimensionFilter(IDictionary dimension) /// Filters the result by series. Only feedbacks for the series in the time series group specified will /// be returned. /// - public DimensionKey DimensionFilter { get; private set; } + public DimensionKey DimensionFilter { get; set; } /// /// Used by CodeGen during serialization. /// internal IDictionary Dimension { - get => DimensionFilter.Dimension; + get => DimensionFilter?.Dimension ?? new Dictionary(); set => DimensionFilter = new DimensionKey(value); } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/DimensionKey.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/DimensionKey.cs index c35ee547d821e..9e2207985e13f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/DimensionKey.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Models/TimeSeries/DimensionKey.cs @@ -2,8 +2,8 @@ // Licensed under the MIT License. using System; +using System.Collections; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using Azure.Core; @@ -17,108 +17,61 @@ namespace Azure.AI.MetricsAdvisor.Models /// [CodeGenModel("DimensionGroupIdentity")] [CodeGenSuppress("DimensionKey", typeof(IDictionary))] - public partial class DimensionKey : IEquatable + public partial class DimensionKey : IEnumerable> { /// /// Initializes a new instance of the class. /// - public DimensionKey() + /// The dimension columns to initialize this dimension key with. + public DimensionKey(IEnumerable> dimension) { - Dimension = new ChangeTrackingDictionary(); - } + Argument.AssertNotNull(dimension, nameof(dimension)); - internal DimensionKey(IEnumerable> dimension) - { Dimension = dimension.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); } internal IDictionary Dimension { get; } /// - /// Determines if two values are the same. - /// - /// The first value of comparison. - /// The second value of comparison. - /// true if the instances represent the same dimension. Otherwise, false. - public static bool operator ==(DimensionKey left, DimensionKey right) => left.Equals(right); - - /// - /// Determines if two values are not the same. + /// Gets the value associated with the specified dimension column. /// - /// The first value of comparison. - /// The second value of comparison. - /// true if the instances represent different dimensions. Otherwise, false. - public static bool operator !=(DimensionKey left, DimensionKey right) => !left.Equals(right); - - /// - /// Adds a new dimension column value to this . - /// - /// The name of the dimension column. - /// The value of the dimension column. - /// or is null. - /// or is empty; or the dimension column was already present in the . - public void AddDimensionColumn(string dimensionColumnName, string dimensionColumnValue) + /// The name of the dimension column whose value to get. + /// When this method returns, the value associated with the specified dimension column, if it's found. Otherwise, null. + /// true if this dimension key contains the specified column. Otherwise, false. + /// is null. + /// is empty. + public bool TryGetValue(string columnName, out string value) { - Argument.AssertNotNullOrEmpty(dimensionColumnName, nameof(dimensionColumnName)); - Argument.AssertNotNullOrEmpty(dimensionColumnValue, nameof(dimensionColumnValue)); + Argument.AssertNotNullOrEmpty(columnName, nameof(columnName)); - Dimension.Add(dimensionColumnName, dimensionColumnValue); + return Dimension.TryGetValue(columnName, out value); } /// - /// Removes a new dimension column from this . + /// Determines whether this dimension key contains a dimension column with the specified name. /// - /// The name of the dimension column. - /// is null. - /// is empty; or the dimension column was not present in the . - public void RemoveDimensionColumn(string dimensionColumnName) + /// The name of the dimension column to locate in this key. + /// true if this dimension key contains a column with the specified name. Otherwise, false. + /// is null. + /// is empty. + public bool Contains(string columnName) { - Argument.AssertNotNullOrEmpty(dimensionColumnName, nameof(dimensionColumnName)); + Argument.AssertNotNullOrEmpty(columnName, nameof(columnName)); - if (!Dimension.Remove(dimensionColumnName)) - { - throw new ArgumentException($"Column {dimensionColumnName} was not present in this dimension key.", nameof(dimensionColumnName)); - } + return Dimension.ContainsKey(columnName); } /// - /// Converts this instance into a . + /// Returns an enumerator that iterates through the columns of this dimension key. /// - /// An equivalent . - public Dictionary AsDictionary() => - Dimension.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + /// An enumerator that can be used to iterate through the columns of this dimension key. + public IEnumerator> GetEnumerator() => Dimension.GetEnumerator(); - /// - public bool Equals(DimensionKey other) - { - if (Dimension.Count != other.Dimension.Count) - { - return false; - } - - foreach (KeyValuePair kvp in Dimension) - { - bool isSameKvp = other.Dimension.TryGetValue(kvp.Key, out string value) - && kvp.Value == value; - - if (!isSameKvp) - { - return false; - } - } - - return true; - } - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DimensionKey other && Equals(other); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable CA1065 // Do not raise exceptions in unexpected locations - public override int GetHashCode() => Dimension.GetHashCode(); -#pragma warning restore CA1065 // Do not raise exceptions in unexpected locations + /// + /// Returns an enumerator that iterates through the columns of this dimension key. + /// + /// An enumerator that can be used to iterate through the columns of this dimension key. + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); internal DimensionKey Clone() => new DimensionKey(Dimension); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs index f051bce1a355a..985bed667578f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyAlertConfigurationLiveTests.cs @@ -76,8 +76,8 @@ public async Task CreateAndGetAlertConfigurationWithSeriesGroupScope() string metricId = disposableDataFeed.DataFeed.MetricIds[TempDataFeedMetricName]; await using DisposableDetectionConfiguration disposableDetectionConfig = await CreateTempDetectionConfigurationAsync(adminClient, metricId); - DimensionKey groupKey = new DimensionKey(); - groupKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Delhi"); + var columns = new Dictionary() { { TempDataFeedDimensionNameA, "Delhi" } }; + DimensionKey groupKey = new DimensionKey(columns); var detectionConfigId = disposableDetectionConfig.Configuration.Id; var scope = MetricAnomalyAlertScope.GetScopeForSeriesGroup(groupKey); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyDetectionConfigurationLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyDetectionConfigurationLiveTests.cs index cf21d5b071d1b..1863a1bddd902 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyDetectionConfigurationLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorAdministrationClient/AnomalyDetectionConfigurationLiveTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Azure.AI.MetricsAdvisor.Administration; @@ -139,20 +140,18 @@ public async Task CreateAndGetDetectionConfigurationWithSeriesGroupConditions() // Set the series group conditions and create the configuration. - var groupConditions0 = new MetricSeriesGroupDetectionCondition() + var columns = new Dictionary() { { TempDataFeedDimensionNameA, "Delhi" } }; + var groupConditions0 = new MetricSeriesGroupDetectionCondition(new DimensionKey(columns)) { SmartDetectionCondition = new(30.0, AnomalyDetectorDirection.Both, new(3, 4.0)) }; - groupConditions0.SeriesGroupKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Delhi"); - - var groupConditions1 = new MetricSeriesGroupDetectionCondition() + columns = new Dictionary() { { TempDataFeedDimensionNameA, "Kolkata" } }; + var groupConditions1 = new MetricSeriesGroupDetectionCondition(new DimensionKey(columns)) { ChangeThresholdCondition = new(40.0, 12, false, AnomalyDetectorDirection.Up, new(5, 6.0)) }; - groupConditions1.SeriesGroupKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Koltaka"); - configToCreate.SeriesGroupDetectionConditions.Add(groupConditions0); configToCreate.SeriesGroupDetectionConditions.Add(groupConditions1); @@ -204,7 +203,7 @@ public async Task CreateAndGetDetectionConfigurationWithSeriesGroupConditions() Assert.That(createdGroupConditions1, Is.Not.Null); - ValidateTempDataFeedDimensionKey(createdGroupConditions1.SeriesGroupKey, "Koltaka"); + ValidateTempDataFeedDimensionKey(createdGroupConditions1.SeriesGroupKey, "Kolkata"); Assert.That(createdGroupConditions1.CrossConditionsOperator, Is.Null); Assert.That(createdGroupConditions1.HardThresholdCondition, Is.Null); @@ -242,22 +241,18 @@ public async Task CreateAndGetDetectionConfigurationWithSeriesConditions() // Set the series conditions and create the configuration. - var seriesConditions0 = new MetricSingleSeriesDetectionCondition() + var columns = new Dictionary() { { TempDataFeedDimensionNameA, "Delhi" }, { TempDataFeedDimensionNameB, "Handmade" } }; + var seriesConditions0 = new MetricSingleSeriesDetectionCondition(new DimensionKey(columns)) { SmartDetectionCondition = new(30.0, AnomalyDetectorDirection.Both, new(3, 4.0)) }; - seriesConditions0.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Delhi"); - seriesConditions0.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameB, "Handmade"); - - var seriesConditions1 = new MetricSingleSeriesDetectionCondition() + columns = new Dictionary() { { TempDataFeedDimensionNameA, "Kolkata" }, { TempDataFeedDimensionNameB, "Grocery & Gourmet Food" } }; + var seriesConditions1 = new MetricSingleSeriesDetectionCondition(new DimensionKey(columns)) { ChangeThresholdCondition = new(40.0, 12, false, AnomalyDetectorDirection.Up, new(5, 6.0)) }; - seriesConditions1.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Koltaka"); - seriesConditions1.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameB, "Grocery & Gourmet Food"); - configToCreate.SeriesDetectionConditions.Add(seriesConditions0); configToCreate.SeriesDetectionConditions.Add(seriesConditions1); @@ -309,7 +304,7 @@ public async Task CreateAndGetDetectionConfigurationWithSeriesConditions() Assert.That(createdSeriesConditions1, Is.Not.Null); - ValidateTempDataFeedDimensionKey(createdSeriesConditions1.SeriesKey, "Koltaka", "Grocery & Gourmet Food"); + ValidateTempDataFeedDimensionKey(createdSeriesConditions1.SeriesKey, "Kolkata", "Grocery & Gourmet Food"); Assert.That(createdSeriesConditions1.CrossConditionsOperator, Is.Null); Assert.That(createdSeriesConditions1.HardThresholdCondition, Is.Null); @@ -350,25 +345,22 @@ public async Task UpdateDetectionConfigurationWithMinimumSetup(bool useTokenCred // Set the series group conditions. - var groupConditions = new MetricSeriesGroupDetectionCondition() + var columns = new Dictionary() { { TempDataFeedDimensionNameA, "Kolkata" } }; + var groupConditions = new MetricSeriesGroupDetectionCondition(new DimensionKey(columns)) { ChangeThresholdCondition = new(40.0, 12, false, AnomalyDetectorDirection.Up, new(5, 6.0)) }; - groupConditions.SeriesGroupKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Koltaka"); - configToCreate.SeriesGroupDetectionConditions.Add(groupConditions); // Set the series conditions and create the configuration. - var seriesConditions = new MetricSingleSeriesDetectionCondition() + columns = new Dictionary() { { TempDataFeedDimensionNameA, "Delhi" }, { TempDataFeedDimensionNameB, "Handmade" } }; + var seriesConditions = new MetricSingleSeriesDetectionCondition(new DimensionKey(columns)) { SmartDetectionCondition = new(30.0, AnomalyDetectorDirection.Both, new(3, 4.0)) }; - seriesConditions.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Delhi"); - seriesConditions.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameB, "Handmade"); - configToCreate.SeriesDetectionConditions.Add(seriesConditions); await using var disposableConfig = await DisposableDetectionConfiguration.CreateDetectionConfigurationAsync(adminClient, configToCreate); @@ -407,7 +399,7 @@ public async Task UpdateDetectionConfigurationWithMinimumSetup(bool useTokenCred Assert.That(updatedGroupConditions, Is.Not.Null); - ValidateTempDataFeedDimensionKey(updatedGroupConditions.SeriesGroupKey, "Koltaka"); + ValidateTempDataFeedDimensionKey(updatedGroupConditions.SeriesGroupKey, "Kolkata"); Assert.That(updatedGroupConditions.CrossConditionsOperator, Is.Null); Assert.That(updatedGroupConditions.HardThresholdCondition, Is.Null); @@ -464,25 +456,22 @@ public async Task UpdateDetectionConfigurationWithEveryMember() // Set the series group conditions. - var groupConditions = new MetricSeriesGroupDetectionCondition() + var columns = new Dictionary() { { TempDataFeedDimensionNameA, "Kolkata" } }; + var groupConditions = new MetricSeriesGroupDetectionCondition(new DimensionKey(columns)) { ChangeThresholdCondition = new(40.0, 12, false, AnomalyDetectorDirection.Up, new(5, 6.0)) }; - groupConditions.SeriesGroupKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Koltaka"); - configToCreate.SeriesGroupDetectionConditions.Add(groupConditions); // Set the series conditions and create the configuration. - var seriesConditions = new MetricSingleSeriesDetectionCondition() + columns = new Dictionary() { { TempDataFeedDimensionNameA, "Delhi" }, { TempDataFeedDimensionNameB, "Handmade" } }; + var seriesConditions = new MetricSingleSeriesDetectionCondition(new DimensionKey(columns)) { SmartDetectionCondition = new(30.0, AnomalyDetectorDirection.Both, new(3, 4.0)) }; - seriesConditions.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Delhi"); - seriesConditions.SeriesKey.AddDimensionColumn(TempDataFeedDimensionNameB, "Handmade"); - configToCreate.SeriesDetectionConditions.Add(seriesConditions); await using var disposableConfig = await DisposableDetectionConfiguration.CreateDetectionConfigurationAsync(adminClient, configToCreate); @@ -498,13 +487,12 @@ public async Task UpdateDetectionConfigurationWithEveryMember() configToUpdate.WholeSeriesDetectionConditions.ChangeThresholdCondition = null; configToUpdate.WholeSeriesDetectionConditions.SmartDetectionCondition = new(75.0, AnomalyDetectorDirection.Both, new(15, 16.0)); - var newGroupConditions = new MetricSeriesGroupDetectionCondition() + columns = new Dictionary() { { TempDataFeedDimensionNameA, "Delhi" } }; + var newGroupConditions = new MetricSeriesGroupDetectionCondition(new DimensionKey(columns)) { SmartDetectionCondition = new(95.0, AnomalyDetectorDirection.Both, new(25, 26.0)) }; - newGroupConditions.SeriesGroupKey.AddDimensionColumn(TempDataFeedDimensionNameA, "Delhi"); - configToUpdate.SeriesGroupDetectionConditions.Add(newGroupConditions); configToUpdate.SeriesDetectionConditions.Clear(); @@ -541,7 +529,7 @@ public async Task UpdateDetectionConfigurationWithEveryMember() Assert.That(updatedGroupConditions0, Is.Not.Null); - ValidateTempDataFeedDimensionKey(updatedGroupConditions0.SeriesGroupKey, "Koltaka"); + ValidateTempDataFeedDimensionKey(updatedGroupConditions0.SeriesGroupKey, "Kolkata"); Assert.That(updatedGroupConditions0.CrossConditionsOperator, Is.Null); Assert.That(updatedGroupConditions0.HardThresholdCondition, Is.Null); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs index 13cc7417c5ea5..de5b33e6fdd3d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionLiveTests.cs @@ -62,12 +62,11 @@ public async Task GetAnomaliesForDetectionConfigurationWithOptionalFilter() Filter = new GetAnomaliesForDetectionConfigurationFilter(AnomalySeverity.Medium, AnomalySeverity.Medium) }; - var groupKey1 = new DimensionKey(); - groupKey1.AddDimensionColumn("city", "Delhi"); - groupKey1.AddDimensionColumn("category", "Handmade"); + var columns = new Dictionary() { { "city", "Delhi" }, { "category", "Handmade" } }; + var groupKey1 = new DimensionKey(columns); - var groupKey2 = new DimensionKey(); - groupKey2.AddDimensionColumn("city", "Kolkata"); + columns = new Dictionary() { { "city", "Kolkata" } }; + var groupKey2 = new DimensionKey(columns); options.Filter.SeriesGroupKeys.Add(groupKey1); options.Filter.SeriesGroupKeys.Add(groupKey2); @@ -89,10 +88,8 @@ public async Task GetAnomaliesForDetectionConfigurationWithOptionalFilter() ValidateSeriesKey(anomaly.SeriesKey); - Dictionary dimensionColumns = anomaly.SeriesKey.AsDictionary(); - - string city = dimensionColumns["city"]; - string category = dimensionColumns["category"]; + anomaly.SeriesKey.TryGetValue("city", out string city); + anomaly.SeriesKey.TryGetValue("category", out string category); Assert.That((city == "Delhi" && category == "Handmade") || city == "Kolkata"); @@ -147,12 +144,11 @@ public async Task GetIncidentsForDetectionConfigurationWithOptionalDimensionFilt var options = new GetIncidentsForDetectionConfigurationOptions(SamplingStartTime, SamplingEndTime); - var groupKey1 = new DimensionKey(); - groupKey1.AddDimensionColumn("city", "Delhi"); - groupKey1.AddDimensionColumn("category", "Handmade"); + var columns = new Dictionary() { { "city", "Delhi" }, { "category", "Handmade" } }; + var groupKey1 = new DimensionKey(columns); - var groupKey2 = new DimensionKey(); - groupKey2.AddDimensionColumn("city", "Kolkata"); + columns = new Dictionary() { { "city", "Kolkata" } }; + var groupKey2 = new DimensionKey(columns); options.DimensionsToFilter.Add(groupKey1); options.DimensionsToFilter.Add(groupKey2); @@ -174,10 +170,8 @@ public async Task GetIncidentsForDetectionConfigurationWithOptionalDimensionFilt ValidateSeriesKey(incident.RootDimensionKey); - Dictionary dimensionColumns = incident.RootDimensionKey.AsDictionary(); - - string city = dimensionColumns["city"]; - string category = dimensionColumns["category"]; + incident.RootDimensionKey.TryGetValue("city", out string city); + incident.RootDimensionKey.TryGetValue("category", out string category); Assert.That((city == "Delhi" && category == "Handmade") || city == "Kolkata"); @@ -223,9 +217,8 @@ public async Task GetIncidentRootCausesForIncidentFromDetectionConfiguration() // We already know the the incident we want to get, so apply filters to make the // service call cheaper. - var groupKey = new DimensionKey(); - groupKey.AddDimensionColumn("city", "__SUM__"); - groupKey.AddDimensionColumn("category", "Grocery & Gourmet Food"); + var columns = new Dictionary() { { "city", "__SUM__" }, { "category", "Grocery & Gourmet Food" } }; + var groupKey = new DimensionKey(columns); options.DimensionsToFilter.Add(groupKey); @@ -328,9 +321,11 @@ public async Task GetAnomalyDimensionValuesWithOptionalDimensionFilter() MetricsAdvisorClient client = GetMetricsAdvisorClient(); - var options = new GetAnomalyDimensionValuesOptions(SamplingStartTime, SamplingEndTime); - - options.DimensionToFilter.AddDimensionColumn("category", "Handmade"); + var columns = new Dictionary() { { "category", "Handmade" } }; + var options = new GetAnomalyDimensionValuesOptions(SamplingStartTime, SamplingEndTime) + { + DimensionToFilter = new DimensionKey(columns) + }; var valueCount = 0; @@ -354,13 +349,11 @@ public async Task GetMetricEnrichedSeriesData(bool useTokenCredential) { MetricsAdvisorClient client = GetMetricsAdvisorClient(useTokenCredential); - var seriesKey1 = new DimensionKey(); - seriesKey1.AddDimensionColumn("city", "Delhi"); - seriesKey1.AddDimensionColumn("category", "Handmade"); + var columns = new Dictionary() { { "city", "Delhi" }, { "category", "Handmade" } }; + var seriesKey1 = new DimensionKey(columns); - var seriesKey2 = new DimensionKey(); - seriesKey2.AddDimensionColumn("city", "Koltaka"); - seriesKey2.AddDimensionColumn("category", "__SUM__"); + columns = new Dictionary() { { "city", "Kolkata" }, { "category", "__SUM__" } }; + var seriesKey2 = new DimensionKey(columns); var seriesKeys = new List() { seriesKey1, seriesKey2 }; var returnedKeys = new List(); @@ -394,8 +387,8 @@ public async Task GetMetricEnrichedSeriesData(bool useTokenCredential) returnedKeys.Add(seriesData.SeriesKey); } - IEnumerable>> expectedKvps = seriesKeys.Select(key => key.AsDictionary().ToList()); - IEnumerable>> returnedKvps = returnedKeys.Select(key => key.AsDictionary().ToList()); + IEnumerable>> expectedKvps = seriesKeys.Select(key => key.ToList()); + IEnumerable>> returnedKvps = returnedKeys.Select(key => key.ToList()); Assert.That(returnedKvps, Is.EquivalentTo(expectedKvps)); } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs index 6a55622b8b2a8..4bd87fa687f1a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/AnomalyDetectionTests.cs @@ -197,8 +197,10 @@ public void GetMetricEnrichedSeriesDataValidatesArguments() { MetricsAdvisorClient client = GetMetricsAdvisorClient(); + var columns = new Dictionary() { { "name", "value" } }; + var emptyList = new List(); - var seriesKeys = new List() { new DimensionKey() }; + var seriesKeys = new List() { new DimensionKey(columns) }; Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(FakeGuid, null, default, default), Throws.InstanceOf()); Assert.That(() => client.GetMetricEnrichedSeriesDataAsync(FakeGuid, emptyList, default, default), Throws.InstanceOf()); @@ -218,8 +220,10 @@ public void GetMetricEnrichedSeriesDataRespectsTheCancellationToken() { MetricsAdvisorClient client = GetMetricsAdvisorClient(); + var columns = new Dictionary() { { "name", "value" } }; + var emptyList = new List(); - var seriesKeys = new List() { new DimensionKey() }; + var seriesKeys = new List() { new DimensionKey(columns) }; using var cancellationSource = new CancellationTokenSource(); cancellationSource.Cancel(); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/MetricFeedbackLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/MetricFeedbackLiveTests.cs index 9c0a754583c9d..bdb9c9eea17c8 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/MetricFeedbackLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/MetricFeedbackLiveTests.cs @@ -31,10 +31,11 @@ public async Task AddAndGetAnomalyFeedbackWithMinimumSetup(bool useTokenCredenti { MetricsAdvisorClient client = GetMetricsAdvisorClient(useTokenCredential); - var filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", ExpectedCity); - filter.DimensionFilter.AddDimensionColumn("category", ExpectedCategory); + var columns = new Dictionary() { { "city", ExpectedCity }, { "category", ExpectedCategory } }; + var filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(columns) + }; var feedbackToAdd = new MetricAnomalyFeedback(MetricId, filter, CreatedFeedbackStartTime, CreatedFeedbackEndTime, AnomalyValue.AutoDetect); @@ -59,10 +60,11 @@ public async Task AddAndGetAnomalyFeedbackWithOptionalDetectionConfigurationFilt { MetricsAdvisorClient client = GetMetricsAdvisorClient(); - var filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", ExpectedCity); - filter.DimensionFilter.AddDimensionColumn("category", ExpectedCategory); + var columns = new Dictionary() { { "city", ExpectedCity }, { "category", ExpectedCategory } }; + var filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(columns) + }; var feedbackToAdd = new MetricAnomalyFeedback(MetricId, filter, CreatedFeedbackStartTime, CreatedFeedbackEndTime, AnomalyValue.AutoDetect) { @@ -90,10 +92,11 @@ public async Task AddAndGetChangePointFeedback() { MetricsAdvisorClient client = GetMetricsAdvisorClient(); - var filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", ExpectedCity); - filter.DimensionFilter.AddDimensionColumn("category", ExpectedCategory); + var columns = new Dictionary() { { "city", ExpectedCity }, { "category", ExpectedCategory } }; + var filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(columns) + }; var feedbackToAdd = new MetricChangePointFeedback(MetricId, filter, CreatedFeedbackStartTime, CreatedFeedbackEndTime, ChangePointValue.AutoDetect); @@ -121,10 +124,11 @@ public async Task AddAndGetCommentFeedbackWithMinimumSetup() { MetricsAdvisorClient client = GetMetricsAdvisorClient(); - var filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", ExpectedCity); - filter.DimensionFilter.AddDimensionColumn("category", ExpectedCategory); + var columns = new Dictionary() { { "city", ExpectedCity }, { "category", ExpectedCategory } }; + var filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(columns) + }; var comment = "Feedback created in a .NET test."; @@ -149,10 +153,11 @@ public async Task AddAndGetCommentFeedbackWithOptionalTimeFilters() { MetricsAdvisorClient client = GetMetricsAdvisorClient(); - var filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", ExpectedCity); - filter.DimensionFilter.AddDimensionColumn("category", ExpectedCategory); + var columns = new Dictionary() { { "city", ExpectedCity }, { "category", ExpectedCategory } }; + var filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(columns) + }; var comment = "Feedback created in a .NET test."; @@ -181,10 +186,11 @@ public async Task AddAndGetPeriodFeedback() { MetricsAdvisorClient client = GetMetricsAdvisorClient(); - var filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", ExpectedCity); - filter.DimensionFilter.AddDimensionColumn("category", ExpectedCategory); + var columns = new Dictionary() { { "city", ExpectedCity }, { "category", ExpectedCategory } }; + var filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(columns) + }; var periodValue = 10; @@ -281,16 +287,16 @@ public async Task GetAllFeedbackWithOptionalFeedbackFilter() DateTimeOffset feedbackSamplingStartTime = DateTimeOffset.Parse("2020-12-01T00:00:00Z"); DateTimeOffset feedbackSamplingEndTime = DateTimeOffset.Parse("2020-12-31T00:00:00Z"); + var columns = new Dictionary() { { "city", "Delhi" } }; var options = new GetAllFeedbackOptions() { + Filter = new DimensionKey(columns), TimeMode = FeedbackQueryTimeMode.FeedbackCreatedTime, StartTime = feedbackSamplingStartTime, EndTime = feedbackSamplingEndTime, FeedbackType = FeedbackType.Comment, }; - options.Filter.AddDimensionColumn("city", "Delhi"); - var feedbackCount = 0; await foreach (MetricFeedback feedback in client.GetAllFeedbackAsync(MetricId, options)) @@ -304,14 +310,15 @@ public async Task GetAllFeedbackWithOptionalFeedbackFilter() Assert.That(feedback.CreatedTime, Is.LessThanOrEqualTo(feedbackSamplingEndTime)); Assert.That(feedback.DimensionFilter, Is.Not.Null); - Assert.That(feedback.DimensionFilter.DimensionFilter, Is.Not.Null); - ValidateGroupKey(feedback.DimensionFilter.DimensionFilter); + DimensionKey dimensionKeyFilter = feedback.DimensionFilter.DimensionFilter; - Dictionary dimensionColumns = feedback.DimensionFilter.DimensionFilter.AsDictionary(); + Assert.That(dimensionKeyFilter, Is.Not.Null); - Assert.That(dimensionColumns.ContainsKey("city")); - Assert.That(dimensionColumns["city"], Is.EqualTo("Delhi")); + ValidateGroupKey(dimensionKeyFilter); + + Assert.That(dimensionKeyFilter.TryGetValue("city", out string city)); + Assert.That(city, Is.EqualTo("Delhi")); Assert.That(feedback.Type, Is.EqualTo(FeedbackType.Comment)); @@ -340,15 +347,16 @@ private void ValidateMetricFeedback(MetricFeedback feedback) Assert.That(feedback.CreatedTime, Is.GreaterThan(justNow)); Assert.That(feedback.DimensionFilter, Is.Not.Null); - Assert.That(feedback.DimensionFilter.DimensionFilter, Is.Not.Null); - var dimensionColumns = feedback.DimensionFilter.DimensionFilter.AsDictionary(); + DimensionKey dimensionFilter = feedback.DimensionFilter.DimensionFilter; + + Assert.That(dimensionFilter, Is.Not.Null); - Assert.That(dimensionColumns.Count, Is.EqualTo(2)); - Assert.That(dimensionColumns.ContainsKey("city")); - Assert.That(dimensionColumns.ContainsKey("category")); - Assert.That(dimensionColumns["city"], Is.EqualTo(ExpectedCity)); - Assert.That(dimensionColumns["category"], Is.EqualTo(ExpectedCategory)); + Assert.That(Count(dimensionFilter), Is.EqualTo(2)); + Assert.That(dimensionFilter.TryGetValue("city", out string city)); + Assert.That(dimensionFilter.TryGetValue("category", out string category)); + Assert.That(city, Is.EqualTo(ExpectedCity)); + Assert.That(category, Is.EqualTo(ExpectedCategory)); } } } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs index 5066072921cfc..a573fdf92c88e 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorClient/TimeSeriesLiveTests.cs @@ -118,10 +118,10 @@ public async Task GetMetricSeriesDefinitionsWithOptionalDimensionFilter() ValidateSeriesKey(definition.SeriesKey); - Dictionary dimensionColumns = definition.SeriesKey.AsDictionary(); + DimensionKey seriesKey = definition.SeriesKey; - string city = dimensionColumns["city"]; - string category = dimensionColumns["category"]; + Assert.That(seriesKey.TryGetValue("city", out string city)); + Assert.That(seriesKey.TryGetValue("category", out string category)); Assert.That(cityFilter.Contains(city)); Assert.That(categoryFilter.Contains(category)); @@ -142,15 +142,15 @@ public async Task GetMetricSeriesData(bool useTokenCredential) { MetricsAdvisorClient client = GetMetricsAdvisorClient(useTokenCredential); - var seriesKey1 = new DimensionKey(); - seriesKey1.AddDimensionColumn("city", "Delhi"); - seriesKey1.AddDimensionColumn("category", "Handmade"); + var columns = new Dictionary() { { "city", "Delhi" }, { "category", "Handmade" } }; + var seriesKey1 = new DimensionKey(columns); - var seriesKey2 = new DimensionKey(); - seriesKey2.AddDimensionColumn("city", "Koltaka"); - seriesKey2.AddDimensionColumn("category", "__SUM__"); + columns = new Dictionary() { { "city", "Kolkata" }, { "category", "__SUM__" } }; + var seriesKey2 = new DimensionKey(columns); - var returnedKeys = new List(); + var returnedKey1 = false; + var returnedKey2 = false; + var seriesDataCount = 0; var options = new GetMetricSeriesDataOptions(SamplingStartTime, SamplingEndTime) { @@ -173,12 +173,26 @@ public async Task GetMetricSeriesData(bool useTokenCredential) Assert.That(timestamp, Is.InRange(SamplingStartTime, SamplingEndTime)); } - returnedKeys.Add(seriesData.SeriesKey); + var seriesKey = seriesData.SeriesKey; + + Assert.That(seriesKey.TryGetValue("city", out string city)); + Assert.That(seriesKey.TryGetValue("category", out string category)); + + if (city == "Delhi" && category == "Handmade") + { + returnedKey1 = true; + } + else if (city == "Kolkata" && category == "__SUM__") + { + returnedKey2 = true; + } + + seriesDataCount++; } - Assert.That(returnedKeys.Count, Is.EqualTo(2)); - Assert.That(returnedKeys.Contains(seriesKey1)); - Assert.That(returnedKeys.Contains(seriesKey2)); + Assert.That(seriesDataCount, Is.EqualTo(2)); + Assert.That(returnedKey1); + Assert.That(returnedKey2); } [RecordedTest] diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorLiveTestBase.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorLiveTestBase.cs index d5aae77b48d06..16cfe708f033d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorLiveTestBase.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/MetricsAdvisorLiveTestBase.cs @@ -82,58 +82,66 @@ protected async Task CreateTempDataFeedAsync(MetricsAdvisorA return await DisposableDataFeed.CreateDataFeedAsync(adminClient, dataFeed); } + protected int Count(DimensionKey dimensionKey) + { + int count = 0; + + foreach (var _ in dimensionKey) + { + count++; + } + + return count; + } + protected void ValidateSeriesKey(DimensionKey seriesKey) { Assert.That(seriesKey, Is.Not.Null); - Dictionary dimensionColumns = seriesKey.AsDictionary(); + Assert.That(Count(seriesKey), Is.EqualTo(2)); + Assert.That(seriesKey.TryGetValue("city", out string city)); + Assert.That(seriesKey.TryGetValue("category", out string category)); - Assert.That(dimensionColumns.Count, Is.EqualTo(2)); - Assert.That(dimensionColumns.ContainsKey("city")); - Assert.That(dimensionColumns.ContainsKey("category")); - - Assert.That(dimensionColumns["city"], Is.Not.Null.And.Not.Empty); - Assert.That(dimensionColumns["category"], Is.Not.Null.And.Not.Empty); + Assert.That(city, Is.Not.Null.And.Not.Empty); + Assert.That(category, Is.Not.Null.And.Not.Empty); } protected void ValidateGroupKey(DimensionKey groupKey) { Assert.That(groupKey, Is.Not.Null); - Dictionary dimensionColumns = groupKey.AsDictionary(); - - Assert.That(dimensionColumns.Count, Is.GreaterThan(0)); - Assert.That(dimensionColumns.Count, Is.LessThanOrEqualTo(2)); + int count = 0; - foreach (KeyValuePair column in dimensionColumns) + foreach (KeyValuePair column in groupKey) { Assert.That(column.Key, Is.EqualTo("city").Or.EqualTo("category")); Assert.That(column.Value, Is.Not.Null.And.Not.Empty); + + count++; } + + Assert.That(count, Is.GreaterThan(0)); + Assert.That(count, Is.LessThanOrEqualTo(2)); } protected void ValidateTempDataFeedDimensionKey(DimensionKey dimensionKey, string expectedDimensionA) { Assert.That(dimensionKey, Is.Not.Null); - Dictionary dimensionColumns = dimensionKey.AsDictionary(); - - Assert.That(dimensionColumns.Count, Is.EqualTo(1)); - Assert.That(dimensionColumns.ContainsKey(TempDataFeedDimensionNameA)); - Assert.That(dimensionColumns[TempDataFeedDimensionNameA], Is.EqualTo(expectedDimensionA)); + Assert.That(Count(dimensionKey), Is.EqualTo(1)); + Assert.That(dimensionKey.TryGetValue(TempDataFeedDimensionNameA, out string dimensionA)); + Assert.That(dimensionA, Is.EqualTo(expectedDimensionA)); } protected void ValidateTempDataFeedDimensionKey(DimensionKey dimensionKey, string expectedDimensionA, string expectedDimensionB) { Assert.That(dimensionKey, Is.Not.Null); - Dictionary dimensionDictionary = dimensionKey.AsDictionary(); - - Assert.That(dimensionDictionary.Count, Is.EqualTo(2)); - Assert.That(dimensionDictionary.ContainsKey(TempDataFeedDimensionNameA)); - Assert.That(dimensionDictionary.ContainsKey(TempDataFeedDimensionNameB)); - Assert.That(dimensionDictionary[TempDataFeedDimensionNameA], Is.EqualTo(expectedDimensionA)); - Assert.That(dimensionDictionary[TempDataFeedDimensionNameB], Is.EqualTo(expectedDimensionB)); + Assert.That(Count(dimensionKey), Is.EqualTo(2)); + Assert.That(dimensionKey.TryGetValue(TempDataFeedDimensionNameA, out string dimensionA)); + Assert.That(dimensionKey.TryGetValue(TempDataFeedDimensionNameB, out string dimensionB)); + Assert.That(dimensionA, Is.EqualTo(expectedDimensionA)); + Assert.That(dimensionB, Is.EqualTo(expectedDimensionB)); } private MetricsAdvisorClientsOptions GetInstrumentedOptions() diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Models/DimensionKeyTests.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Models/DimensionKeyTests.cs new file mode 100644 index 0000000000000..e11f176978139 --- /dev/null +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Models/DimensionKeyTests.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using Azure.AI.MetricsAdvisor.Models; +using NUnit.Framework; + +namespace Azure.AI.MetricsAdvisor.Tests +{ + public class DimensionKeyTests + { + [Test] + public void DimensionKeyValidatesArguments() + { + Assert.That(() => new DimensionKey(null), Throws.ArgumentNullException); + } + + [Test] + public void TryGetValueValidatesArguments() + { + var columns = new Dictionary(); + var dimensionKey = new DimensionKey(columns); + + Assert.That(() => dimensionKey.TryGetValue(null, out var _), Throws.ArgumentNullException); + Assert.That(() => dimensionKey.TryGetValue("", out var _), Throws.ArgumentException); + } + + [Test] + public void TryGetValueGetsValues() + { + var columns = new Dictionary() { { "name1", "value1" }, { "name2", "value2" } }; + var dimensionKey = new DimensionKey(columns); + + Assert.That(dimensionKey.TryGetValue("name1", out string value1)); + Assert.That(dimensionKey.TryGetValue("name2", out string value2)); + + Assert.That(value1, Is.EqualTo("value1")); + Assert.That(value2, Is.EqualTo("value2")); + } + + [Test] + public void TryGetValueReturnsFalseForMissingValue() + { + var columns = new Dictionary() { { "name", "value" } }; + var dimensionKey = new DimensionKey(columns); + + Assert.That(dimensionKey.TryGetValue("otherName", out string value), Is.False); + Assert.That(value, Is.Null); + } + + [Test] + public void ContainsValidatesArguments() + { + var columns = new Dictionary(); + var dimensionKey = new DimensionKey(columns); + + Assert.That(() => dimensionKey.Contains(null), Throws.ArgumentNullException); + Assert.That(() => dimensionKey.Contains(""), Throws.ArgumentException); + } + + [Test] + public void ContainsChecksColumns() + { + var columns = new Dictionary() { { "name", "value" } }; + var dimensionKey = new DimensionKey(columns); + + Assert.That(dimensionKey.Contains("name")); + Assert.That(dimensionKey.Contains("otherName"), Is.False); + } + + [Test] + public void DimensionKeyEnumeratesColumns() + { + var columns = new Dictionary() { { "name1", "value1" }, { "name2", "value2" } }; + var dimensionKey = new DimensionKey(columns); + + var enumeratedColumns = new Dictionary(); + + foreach (KeyValuePair column in dimensionKey) + { + enumeratedColumns.Add(column.Key, column.Value); + } + + Assert.That(enumeratedColumns, Is.EquivalentTo(columns)); + } + } +} diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs index faea8ee84b394..285da7eb4ef4b 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample07_QueryDetectedAnomalies.cs @@ -46,9 +46,9 @@ public async Task GetAnomaliesForDetectionConfigurationAsync() Console.WriteLine($"Severity: {anomaly.Severity}"); Console.WriteLine("Series key:"); - foreach (KeyValuePair keyValuePair in anomaly.SeriesKey.AsDictionary()) + foreach (KeyValuePair dimensionColumn in anomaly.SeriesKey) { - Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); + Console.WriteLine($" Dimension '{dimensionColumn.Key}': {dimensionColumn.Value}"); } Console.WriteLine(); @@ -102,9 +102,9 @@ public async Task GetAnomaliesForAlertAsync() Console.WriteLine($"Severity: {anomaly.Severity}"); Console.WriteLine("Series key:"); - foreach (KeyValuePair keyValuePair in anomaly.SeriesKey.AsDictionary()) + foreach (KeyValuePair dimensionColumn in anomaly.SeriesKey) { - Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); + Console.WriteLine($" Dimension '{dimensionColumn.Key}': {dimensionColumn.Value}"); } Console.WriteLine(); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample08_QueryIncidentsAndRootCauses.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample08_QueryIncidentsAndRootCauses.cs index cbcc16d9af38c..32f967112c07f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample08_QueryIncidentsAndRootCauses.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample08_QueryIncidentsAndRootCauses.cs @@ -27,12 +27,18 @@ public async Task GetIncidentsForDetectionConfigurationAsync() // Only incidents from time series that are part of one of the groups specified // will be returned. - var groupKey1 = new DimensionKey(); - groupKey1.AddDimensionColumn("city", "Bengaluru"); + var dimensionColumns = new Dictionary() + { + { "city", "Bengaluru" } + }; + var groupKey1 = new DimensionKey(dimensionColumns); - var groupKey2 = new DimensionKey(); - groupKey2.AddDimensionColumn("city", "Hong Kong"); - groupKey2.AddDimensionColumn("category", "Industrial & Scientific"); + dimensionColumns = new Dictionary() + { + { "city", "Hong Kong" }, + { "category", "Industrial & Scientific" } + }; + var groupKey2 = new DimensionKey(dimensionColumns); var startTime = DateTimeOffset.Parse("2020-01-01T00:00:00Z"); var endTime = DateTimeOffset.UtcNow; @@ -59,7 +65,7 @@ public async Task GetIncidentsForDetectionConfigurationAsync() Console.WriteLine("Series key of root node:"); - foreach (KeyValuePair keyValuePair in incident.RootDimensionKey.AsDictionary()) + foreach (KeyValuePair keyValuePair in incident.RootDimensionKey) { Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); } @@ -110,7 +116,7 @@ public async Task GetIncidentsForAlertAsync() Console.WriteLine("Series key of root node:"); - foreach (KeyValuePair keyValuePair in incident.RootDimensionKey.AsDictionary()) + foreach (KeyValuePair keyValuePair in incident.RootDimensionKey) { Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); } @@ -153,7 +159,7 @@ public async Task GetIncidentRootCausesAsync() Console.WriteLine("Series key:"); - foreach (KeyValuePair keyValuePair in rootCause.SeriesKey.AsDictionary()) + foreach (KeyValuePair keyValuePair in rootCause.SeriesKey) { Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs index edc5e81e15611..bbbd8dbc9967d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample09_QueryTimeSeriesInformation.cs @@ -134,7 +134,7 @@ public async Task GetMetricSeriesDefinitionsAsync() { Console.WriteLine("Time series key:"); - foreach (KeyValuePair keyValuePair in definition.SeriesKey.AsDictionary()) + foreach (KeyValuePair keyValuePair in definition.SeriesKey) { Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); } @@ -167,13 +167,19 @@ public async Task GetMetricSeriesDataAsync() // Only the two time series with the keys specified below will be returned. - var seriesKey1 = new DimensionKey(); - seriesKey1.AddDimensionColumn("city", "Belo Horizonte"); - seriesKey1.AddDimensionColumn("category", "__SUM__"); + var dimensionColumns = new Dictionary() + { + { "city", "Belo Horizonte" }, + { "category", "__SUM__" } + }; + var seriesKey1 = new DimensionKey(dimensionColumns); - var seriesKey2 = new DimensionKey(); - seriesKey2.AddDimensionColumn("city", "Hong Kong"); - seriesKey2.AddDimensionColumn("category", "Industrial & Scientific"); + dimensionColumns = new Dictionary() + { + { "city", "Hong Kong" }, + { "category", "Industrial & Scientific" } + }; + var seriesKey2 = new DimensionKey(dimensionColumns); options.SeriesToFilter.Add(seriesKey1); options.SeriesToFilter.Add(seriesKey2); @@ -183,7 +189,7 @@ public async Task GetMetricSeriesDataAsync() Console.WriteLine($"Time series metric ID: {seriesData.MetricId}"); Console.WriteLine("Time series key:"); - foreach (KeyValuePair keyValuePair in seriesData.SeriesKey.AsDictionary()) + foreach (KeyValuePair keyValuePair in seriesData.SeriesKey) { Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); } @@ -216,13 +222,19 @@ public async Task GetMetricEnrichedSeriesDataAsync() // Only the two time series with the keys specified below will be returned. - var seriesKey1 = new DimensionKey(); - seriesKey1.AddDimensionColumn("city", "Belo Horizonte"); - seriesKey1.AddDimensionColumn("category", "__SUM__"); + var dimensionColumns = new Dictionary() + { + { "city", "Belo Horizonte" }, + { "category", "__SUM__" } + }; + var seriesKey1 = new DimensionKey(dimensionColumns); - var seriesKey2 = new DimensionKey(); - seriesKey2.AddDimensionColumn("city", "Hong Kong"); - seriesKey2.AddDimensionColumn("category", "Industrial & Scientific"); + dimensionColumns = new Dictionary() + { + { "city", "Hong Kong" }, + { "category", "Industrial & Scientific" } + }; + var seriesKey2 = new DimensionKey(dimensionColumns); var seriesKeys = new List() { seriesKey1, seriesKey2 }; @@ -233,7 +245,7 @@ public async Task GetMetricEnrichedSeriesDataAsync() { Console.WriteLine("Time series key:"); - foreach (KeyValuePair keyValuePair in seriesData.SeriesKey.AsDictionary()) + foreach (KeyValuePair keyValuePair in seriesData.SeriesKey) { Console.WriteLine($" Dimension '{keyValuePair.Key}': {keyValuePair.Value}"); } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample10_FeedbackCrudOperations.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample10_FeedbackCrudOperations.cs index e62a9c8a2b8e9..2438688c7ee89 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample10_FeedbackCrudOperations.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/Samples/Sample10_FeedbackCrudOperations.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; using System.Threading.Tasks; using Azure.AI.MetricsAdvisor.Models; using Azure.AI.MetricsAdvisor.Tests; @@ -23,9 +24,14 @@ public async Task AddFeedbackAsync() string metricId = MetricId; - FeedbackDimensionFilter filter = new FeedbackDimensionFilter(); - - filter.DimensionFilter.AddDimensionColumn("city", "Belo Horizonte"); + var dimensionColumns = new Dictionary() + { + { "city", "Belo Horizonte" } + }; + FeedbackDimensionFilter filter = new FeedbackDimensionFilter() + { + DimensionFilter = new DimensionKey(dimensionColumns) + }; var startTime = DateTimeOffset.Parse("2020-02-01T00:00:00Z"); var endTime = DateTimeOffset.Parse("2020-02-03T00:00:00Z"); diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditions.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditions.json index 188b9c81186f3..f0b00f2ccc602 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditions.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditions.json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e6e63ed9d0d8414d8ad4553092fa1d84-537865aa660a4b4f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-80a320e89ab4f04294871066962ad9f6-3727635d5871ef41-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "c386218ff1b7ed8e80936ccca61372fe", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "fe74bb9b-ef15-438d-95c2-f3219301eb11", + "apim-request-id": "f2ee48be-fdb9-46c5-b2d7-a45dac816132", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:21 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/764b17d9-6fe5-4dad-b21a-1ebbc7d5e28c", + "Date": "Thu, 17 Jun 2021 21:31:51 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/537d91e0-d169-43ed-8477-59500aad95e0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "1480", - "x-request-id": "fe74bb9b-ef15-438d-95c2-f3219301eb11" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "465", + "X-Request-ID": "f2ee48be-fdb9-46c5-b2d7-a45dac816132" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/764b17d9-6fe5-4dad-b21a-1ebbc7d5e28c", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/537d91e0-d169-43ed-8477-59500aad95e0", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e6e63ed9d0d8414d8ad4553092fa1d84-9a92b8eba633554f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-80a320e89ab4f04294871066962ad9f6-ffd3aedf6944e845-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "1d1bb5332930da790246cc2a904d34b8", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "b7e8248c-8764-4f9d-add2-5e8056b7f454", + "apim-request-id": "6c374e8b-63cf-4b80-8f14-31de8e040075", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:21 GMT", + "Date": "Thu, 17 Jun 2021 21:31:57 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "171", - "x-request-id": "b7e8248c-8764-4f9d-add2-5e8056b7f454" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5246", + "X-Request-ID": "6c374e8b-63cf-4b80-8f14-31de8e040075" }, "ResponseBody": { - "dataFeedId": "764b17d9-6fe5-4dad-b21a-1ebbc7d5e28c", + "dataFeedId": "537d91e0-d169-43ed-8477-59500aad95e0", "dataFeedName": "dataFeed0dbZeJSe", "metrics": [ { - "metricId": "9a3aa0ee-02cb-4247-8e49-dbeb45e4212b", + "metricId": "e34725f2-061a-4d8e-bcaa-4b00ba4b4243", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:03:21Z", + "createdTime": "2021-06-17T21:31:52Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,34 +139,40 @@ "Content-Length": "735", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ea3a37bef7379548967fccf87caecaf0-4db5dee9bff74b45-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-52b1927922532d4c83f8261c5db48b23-9e337411a352eb45-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "ead529f96b54397c6bfe958683f47e65", "x-ms-return-client-request-id": "true" }, - "RequestBody": "{\u0022name\u0022:\u0022configiACePTu1\u0022,\u0022metricId\u0022:\u00229a3aa0ee-02cb-4247-8e49-dbeb45e4212b\u0022,\u0022wholeMetricConfiguration\u0022:{\u0022hardThresholdCondition\u0022:{\u0022lowerBound\u0022:10,\u0022upperBound\u0022:20,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:1,\u0022minRatio\u0022:2}}},\u0022seriesOverrideConfigurations\u0022:[{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Delhi\u0022,\u0022dimensionB\u0022:\u0022Handmade\u0022}},\u0022smartDetectionCondition\u0022:{\u0022sensitivity\u0022:30,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:3,\u0022minRatio\u0022:4}}},{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Koltaka\u0022,\u0022dimensionB\u0022:\u0022Grocery \u0026 Gourmet Food\u0022}},\u0022changeThresholdCondition\u0022:{\u0022changePercentage\u0022:40,\u0022shiftPoint\u0022:12,\u0022withinRange\u0022:false,\u0022anomalyDetectorDirection\u0022:\u0022Up\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:5,\u0022minRatio\u0022:6}}}]}", + "RequestBody": "{\u0022name\u0022:\u0022configiACePTu1\u0022,\u0022metricId\u0022:\u0022e34725f2-061a-4d8e-bcaa-4b00ba4b4243\u0022,\u0022wholeMetricConfiguration\u0022:{\u0022hardThresholdCondition\u0022:{\u0022lowerBound\u0022:10,\u0022upperBound\u0022:20,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:1,\u0022minRatio\u0022:2}}},\u0022seriesOverrideConfigurations\u0022:[{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Delhi\u0022,\u0022dimensionB\u0022:\u0022Handmade\u0022}},\u0022smartDetectionCondition\u0022:{\u0022sensitivity\u0022:30,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:3,\u0022minRatio\u0022:4}}},{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Kolkata\u0022,\u0022dimensionB\u0022:\u0022Grocery \u0026 Gourmet Food\u0022}},\u0022changeThresholdCondition\u0022:{\u0022changePercentage\u0022:40,\u0022shiftPoint\u0022:12,\u0022withinRange\u0022:false,\u0022anomalyDetectorDirection\u0022:\u0022Up\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:5,\u0022minRatio\u0022:6}}}]}", "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "35c00faa-62d8-4208-a968-233ad0f783f4", + "apim-request-id": "cc16df0e-9a64-4d04-ab70-440d0af5835a", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:21 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/6623ba52-b915-401b-8a44-55aa021a5fc5", + "Date": "Thu, 17 Jun 2021 21:31:57 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/38c8c5b5-6937-479d-9d10-7692399eca71", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "190", - "x-request-id": "35c00faa-62d8-4208-a968-233ad0f783f4" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "318", + "X-Request-ID": "cc16df0e-9a64-4d04-ab70-440d0af5835a" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/6623ba52-b915-401b-8a44-55aa021a5fc5", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/38c8c5b5-6937-479d-9d10-7692399eca71", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ea3a37bef7379548967fccf87caecaf0-6e911cf80ffea546-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-52b1927922532d4c83f8261c5db48b23-566a6174276cec4f-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "71c0aca76325325c5eb3c1d78e8411c7", "x-ms-return-client-request-id": "true" @@ -168,20 +180,20 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "683971e8-5983-4f22-8907-7056aae54267", + "apim-request-id": "b0031bb0-8235-4048-83c6-5a20927c985d", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:21 GMT", + "Date": "Thu, 17 Jun 2021 21:31:57 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "104", - "x-request-id": "683971e8-5983-4f22-8907-7056aae54267" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "215", + "X-Request-ID": "b0031bb0-8235-4048-83c6-5a20927c985d" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "6623ba52-b915-401b-8a44-55aa021a5fc5", + "anomalyDetectionConfigurationId": "38c8c5b5-6937-479d-9d10-7692399eca71", "name": "configiACePTu1", "description": "", - "metricId": "9a3aa0ee-02cb-4247-8e49-dbeb45e4212b", + "metricId": "e34725f2-061a-4d8e-bcaa-4b00ba4b4243", "wholeMetricConfiguration": { "hardThresholdCondition": { "lowerBound": 10.0, @@ -214,7 +226,7 @@ { "series": { "dimension": { - "dimensionA": "Koltaka", + "dimensionA": "Kolkata", "dimensionB": "Grocery \u0026 Gourmet Food" } }, @@ -233,131 +245,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/6623ba52-b915-401b-8a44-55aa021a5fc5", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f25585242afc7e4582fe09734d5a9b4e-c6ae687b7dee1741-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "0623d30a8f549786c992bf91b8ae3516", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "4985d53c-957f-49da-a3db-31be3fed12fe", - "Content-Length": "881", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:21 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "101", - "x-request-id": "4985d53c-957f-49da-a3db-31be3fed12fe" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "6623ba52-b915-401b-8a44-55aa021a5fc5", - "name": "configiACePTu1", - "description": "", - "metricId": "9a3aa0ee-02cb-4247-8e49-dbeb45e4212b", - "wholeMetricConfiguration": { - "hardThresholdCondition": { - "lowerBound": 10.0, - "upperBound": 20.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "dimensionA": "Delhi", - "dimensionB": "Handmade" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - }, - { - "series": { - "dimension": { - "dimensionA": "Koltaka", - "dimensionB": "Grocery \u0026 Gourmet Food" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } - ] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/6623ba52-b915-401b-8a44-55aa021a5fc5", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/38c8c5b5-6937-479d-9d10-7692399eca71", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e7ddf6a7ebed44498819f8dc46bc1fa1-118a0b0ef7929645-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-c963e55337be634bb07e74d180e5cdee-963fe77a4b9aaf40-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "41461f5038aa9522cda28ca0a9a4abe6", + "x-ms-client-request-id": "0623d30a8f549786c992bf91b8ae3516", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "8881dfea-3572-4e50-a550-36823958d779", + "apim-request-id": "640316b4-5a5f-427a-abcf-69a8c5d7cdea", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:22 GMT", + "Date": "Thu, 17 Jun 2021 21:32:03 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "126", - "x-request-id": "8881dfea-3572-4e50-a550-36823958d779" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5128", + "X-Request-ID": "640316b4-5a5f-427a-abcf-69a8c5d7cdea" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/764b17d9-6fe5-4dad-b21a-1ebbc7d5e28c", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/537d91e0-d169-43ed-8477-59500aad95e0", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7ef6448698edc740a64c0d97a0cafb58-a328ba6011ba394d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2acba7472b3b154887b5aca44ad1b6bf-df4a123b9d447945-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "af7bcded77d018112529a893a4ca7aaf", + "x-ms-client-request-id": "41461f5038aa9522cda28ca0a9a4abe6", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "b6962860-5dda-4170-b025-7619d60528dd", + "apim-request-id": "63a5d59f-5f1c-4768-bb46-081c3b72441c", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:22 GMT", + "Date": "Thu, 17 Jun 2021 21:32:08 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "285", - "x-request-id": "b6962860-5dda-4170-b025-7619d60528dd" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5330", + "X-Request-ID": "63a5d59f-5f1c-4768-bb46-081c3b72441c" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditionsAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditionsAsync.json index 27d33f3de9495..45e4c8014ec76 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditionsAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesConditionsAsync.json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-473de526149cd643877da0eea743cbd9-54b2fbfb7c00f843-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-55321b0ca3ff224caa26d20e86f1ad44-ac240cae768d7e46-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "faafdc09586e1851afb018424d0af9ee", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "4d885a0b-8888-449c-9234-df5839f1fdf6", + "apim-request-id": "5ba86640-64af-4336-80eb-aee5e92f7122", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:46 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ec0181e5-42e4-45c1-8193-b3c539ad6416", + "Date": "Thu, 17 Jun 2021 21:32:31 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/cb09d1a2-197a-4714-a03a-fd966969df32", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "543", - "x-request-id": "4d885a0b-8888-449c-9234-df5839f1fdf6" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "364", + "X-Request-ID": "5ba86640-64af-4336-80eb-aee5e92f7122" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ec0181e5-42e4-45c1-8193-b3c539ad6416", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/cb09d1a2-197a-4714-a03a-fd966969df32", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-473de526149cd643877da0eea743cbd9-e45fdfddec629e4a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-55321b0ca3ff224caa26d20e86f1ad44-19919a78be209645-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "650c83fac415315b08da84256ab01572", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "3387706b-fb39-4724-9b8e-552645ecbb7f", + "apim-request-id": "8e9370e4-4f27-46fc-b6cd-3ebae9877efa", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:46 GMT", + "Date": "Thu, 17 Jun 2021 21:32:32 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "159", - "x-request-id": "3387706b-fb39-4724-9b8e-552645ecbb7f" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "157", + "X-Request-ID": "8e9370e4-4f27-46fc-b6cd-3ebae9877efa" }, "ResponseBody": { - "dataFeedId": "ec0181e5-42e4-45c1-8193-b3c539ad6416", + "dataFeedId": "cb09d1a2-197a-4714-a03a-fd966969df32", "dataFeedName": "dataFeedqqScA538", "metrics": [ { - "metricId": "090a0b92-f39e-44e4-a508-cad3181b4648", + "metricId": "6e5362a1-f8b4-4b51-8f98-ed779354f26b", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:03:46Z", + "createdTime": "2021-06-17T21:32:32Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,34 +139,40 @@ "Content-Length": "735", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0b8b3ba43a9a6e489b23ef5e957dfa6b-6fefa9f172554a40-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-107578894e3d624e8cb8173485aa0b32-6af63c9d0b1aff41-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "690362e430e4d34f304b23f7b6725d45", "x-ms-return-client-request-id": "true" }, - "RequestBody": "{\u0022name\u0022:\u0022configxIxABLlr\u0022,\u0022metricId\u0022:\u0022090a0b92-f39e-44e4-a508-cad3181b4648\u0022,\u0022wholeMetricConfiguration\u0022:{\u0022hardThresholdCondition\u0022:{\u0022lowerBound\u0022:10,\u0022upperBound\u0022:20,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:1,\u0022minRatio\u0022:2}}},\u0022seriesOverrideConfigurations\u0022:[{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Delhi\u0022,\u0022dimensionB\u0022:\u0022Handmade\u0022}},\u0022smartDetectionCondition\u0022:{\u0022sensitivity\u0022:30,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:3,\u0022minRatio\u0022:4}}},{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Koltaka\u0022,\u0022dimensionB\u0022:\u0022Grocery \u0026 Gourmet Food\u0022}},\u0022changeThresholdCondition\u0022:{\u0022changePercentage\u0022:40,\u0022shiftPoint\u0022:12,\u0022withinRange\u0022:false,\u0022anomalyDetectorDirection\u0022:\u0022Up\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:5,\u0022minRatio\u0022:6}}}]}", + "RequestBody": "{\u0022name\u0022:\u0022configxIxABLlr\u0022,\u0022metricId\u0022:\u00226e5362a1-f8b4-4b51-8f98-ed779354f26b\u0022,\u0022wholeMetricConfiguration\u0022:{\u0022hardThresholdCondition\u0022:{\u0022lowerBound\u0022:10,\u0022upperBound\u0022:20,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:1,\u0022minRatio\u0022:2}}},\u0022seriesOverrideConfigurations\u0022:[{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Delhi\u0022,\u0022dimensionB\u0022:\u0022Handmade\u0022}},\u0022smartDetectionCondition\u0022:{\u0022sensitivity\u0022:30,\u0022anomalyDetectorDirection\u0022:\u0022Both\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:3,\u0022minRatio\u0022:4}}},{\u0022series\u0022:{\u0022dimension\u0022:{\u0022dimensionA\u0022:\u0022Kolkata\u0022,\u0022dimensionB\u0022:\u0022Grocery \u0026 Gourmet Food\u0022}},\u0022changeThresholdCondition\u0022:{\u0022changePercentage\u0022:40,\u0022shiftPoint\u0022:12,\u0022withinRange\u0022:false,\u0022anomalyDetectorDirection\u0022:\u0022Up\u0022,\u0022suppressCondition\u0022:{\u0022minNumber\u0022:5,\u0022minRatio\u0022:6}}}]}", "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "87c4d16e-47a2-4038-a5ef-73703b16627e", + "apim-request-id": "c82732a4-4bb3-461f-880d-f13bdf785589", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:46 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/f5f95053-2e9b-42d1-b97d-69e400829881", + "Date": "Thu, 17 Jun 2021 21:32:32 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/da39460f-167b-4962-a11b-2816610c74cd", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "201", - "x-request-id": "87c4d16e-47a2-4038-a5ef-73703b16627e" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "248", + "X-Request-ID": "c82732a4-4bb3-461f-880d-f13bdf785589" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/f5f95053-2e9b-42d1-b97d-69e400829881", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/da39460f-167b-4962-a11b-2816610c74cd", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0b8b3ba43a9a6e489b23ef5e957dfa6b-dff3c79f729a4d4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-107578894e3d624e8cb8173485aa0b32-af7deb7a4dac4947-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "93f17e802cd3ffae9aa667d35c849340", "x-ms-return-client-request-id": "true" @@ -168,20 +180,20 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "632b22e6-bbbf-4377-a681-3455b8421f5c", + "apim-request-id": "5c581c08-8dd3-439c-8cfc-d6a563f9153f", "Content-Length": "881", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:46 GMT", + "Date": "Thu, 17 Jun 2021 21:32:32 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "86", - "x-request-id": "632b22e6-bbbf-4377-a681-3455b8421f5c" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "90", + "X-Request-ID": "5c581c08-8dd3-439c-8cfc-d6a563f9153f" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "f5f95053-2e9b-42d1-b97d-69e400829881", + "anomalyDetectionConfigurationId": "da39460f-167b-4962-a11b-2816610c74cd", "name": "configxIxABLlr", "description": "", - "metricId": "090a0b92-f39e-44e4-a508-cad3181b4648", + "metricId": "6e5362a1-f8b4-4b51-8f98-ed779354f26b", "wholeMetricConfiguration": { "hardThresholdCondition": { "lowerBound": 10.0, @@ -214,7 +226,7 @@ { "series": { "dimension": { - "dimensionA": "Koltaka", + "dimensionA": "Kolkata", "dimensionB": "Grocery \u0026 Gourmet Food" } }, @@ -233,131 +245,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/f5f95053-2e9b-42d1-b97d-69e400829881", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e14c357003793c449d32929b5c9c3692-afae2b10f59de04e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "b381481af2c0d84d8bb1f51e8c1ebc67", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "697fac36-f02a-4a6f-98c6-78eb3112344e", - "Content-Length": "881", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:46 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "91", - "x-request-id": "697fac36-f02a-4a6f-98c6-78eb3112344e" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "f5f95053-2e9b-42d1-b97d-69e400829881", - "name": "configxIxABLlr", - "description": "", - "metricId": "090a0b92-f39e-44e4-a508-cad3181b4648", - "wholeMetricConfiguration": { - "hardThresholdCondition": { - "lowerBound": 10.0, - "upperBound": 20.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "dimensionA": "Delhi", - "dimensionB": "Handmade" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - }, - { - "series": { - "dimension": { - "dimensionA": "Koltaka", - "dimensionB": "Grocery \u0026 Gourmet Food" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } - ] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/f5f95053-2e9b-42d1-b97d-69e400829881", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/da39460f-167b-4962-a11b-2816610c74cd", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-d7e94c6fdbcb3241ab6482ed2ca03927-141fef45a5cd7c4c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-adaa20bec401314bb70ce50eca41e445-d40e6ecb401a3d48-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "dcf4681cd4c7b7f1b304cf3ec87b76ac", + "x-ms-client-request-id": "b381481af2c0d84d8bb1f51e8c1ebc67", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "4477282d-479b-40eb-ae22-4753c14c0783", + "apim-request-id": "d9832e5a-ba79-4d51-b895-42b990f501c7", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:47 GMT", + "Date": "Thu, 17 Jun 2021 21:32:33 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "91", - "x-request-id": "4477282d-479b-40eb-ae22-4753c14c0783" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "99", + "X-Request-ID": "d9832e5a-ba79-4d51-b895-42b990f501c7" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ec0181e5-42e4-45c1-8193-b3c539ad6416", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/cb09d1a2-197a-4714-a03a-fd966969df32", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2639a8c6e4994c419b267db7f13613e3-fb5598b344b0e84b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2ee29178e108844d9752a98690143c11-4af692002fccf442-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "6ddce2b8a9f18e84301908213790727c", + "x-ms-client-request-id": "dcf4681cd4c7b7f1b304cf3ec87b76ac", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "93a3141a-f1e2-449f-a9dd-eac07c002cbf", + "apim-request-id": "c861ba4b-7c17-49a5-b5cb-5383f3479a06", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:47 GMT", + "Date": "Thu, 17 Jun 2021 21:32:33 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "306", - "x-request-id": "93a3141a-f1e2-449f-a9dd-eac07c002cbf" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "315", + "X-Request-ID": "c861ba4b-7c17-49a5-b5cb-5383f3479a06" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditions.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditions.json index 876c3055a43bc..9f770b663a570 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditions.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditions.json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-440ccfe7c5011144a481db17a920174a-55faa0ae21b2b74c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8bd7bb3b728a1e48a5cf36a7529ae5c5-acfdb239183fb241-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "656cd18a353425b4f8cddfbed51bef5d", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "84e285f4-c2cd-4480-9e01-0ced2fa349ed", + "apim-request-id": "be1928a6-0a83-4b11-87c3-11c8529c55bf", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:23 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/89acbfe2-4374-498f-81db-763e2a0ec51f", + "Date": "Thu, 17 Jun 2021 21:32:09 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/055605b7-7420-4a9f-9358-8f00b2c01636", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "574", - "x-request-id": "84e285f4-c2cd-4480-9e01-0ced2fa349ed" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "445", + "X-Request-ID": "be1928a6-0a83-4b11-87c3-11c8529c55bf" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/89acbfe2-4374-498f-81db-763e2a0ec51f", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/055605b7-7420-4a9f-9358-8f00b2c01636", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-440ccfe7c5011144a481db17a920174a-e1f5e43855c7f947-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-8bd7bb3b728a1e48a5cf36a7529ae5c5-4fcd03f38ab96041-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "ca077e7a316f2f42264717cd27d59ee3", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "0a1db1d7-52f0-43c0-aca6-9cb39f6540f7", + "apim-request-id": "a1e33895-34ee-4896-a20d-7f8791a6411e", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:23 GMT", + "Date": "Thu, 17 Jun 2021 21:32:09 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "173", - "x-request-id": "0a1db1d7-52f0-43c0-aca6-9cb39f6540f7" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "240", + "X-Request-ID": "a1e33895-34ee-4896-a20d-7f8791a6411e" }, "ResponseBody": { - "dataFeedId": "89acbfe2-4374-498f-81db-763e2a0ec51f", + "dataFeedId": "055605b7-7420-4a9f-9358-8f00b2c01636", "dataFeedName": "dataFeedYGaiVwzS", "metrics": [ { - "metricId": "47799fe8-b90d-4a47-8942-76c88c17f089", + "metricId": "bd343314-cbee-4907-b753-a0c1ec6b9a33", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:03:23Z", + "createdTime": "2021-06-17T21:32:09Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,15 +139,18 @@ "Content-Length": "663", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7cf9089a195def4f88e5817a4d58d3f7-6a022b48f872164d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-69fc415e511b0d4fb19635ffa257b94b-75b78b35d899d649-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "901dfade075ff72098fc1dc75c87e258", "x-ms-return-client-request-id": "true" }, "RequestBody": { "name": "configLEooYU4b", - "metricId": "47799fe8-b90d-4a47-8942-76c88c17f089", + "metricId": "bd343314-cbee-4907-b753-a0c1ec6b9a33", "wholeMetricConfiguration": { "hardThresholdCondition": { "lowerBound": 10, @@ -171,7 +180,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -189,122 +198,49 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "6ed431c9-5631-49b3-a648-b7f663bf743c", + "apim-request-id": "509dc99e-ff5e-49cb-9165-cd8bcf59a190", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:23 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/5e6a2afb-1a94-4b9b-8d2e-2a1c2423d3ce", + "Date": "Thu, 17 Jun 2021 21:32:10 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/3e91bd3e-19ef-4e87-8a28-38d736bf5d6a", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "182", - "x-request-id": "6ed431c9-5631-49b3-a648-b7f663bf743c" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "374", + "X-Request-ID": "509dc99e-ff5e-49cb-9165-cd8bcf59a190" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/5e6a2afb-1a94-4b9b-8d2e-2a1c2423d3ce", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/3e91bd3e-19ef-4e87-8a28-38d736bf5d6a", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-7cf9089a195def4f88e5817a4d58d3f7-1c68d947fd13884e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "ec3f3d8ee61d23fe2ffc73584c8ab477", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "824ce217-7682-484f-be4d-5ee4d019381f", - "Content-Length": "799", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:23 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "98", - "x-request-id": "824ce217-7682-484f-be4d-5ee4d019381f" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "5e6a2afb-1a94-4b9b-8d2e-2a1c2423d3ce", - "name": "configLEooYU4b", - "description": "", - "metricId": "47799fe8-b90d-4a47-8942-76c88c17f089", - "wholeMetricConfiguration": { - "hardThresholdCondition": { - "lowerBound": 10.0, - "anomalyDetectorDirection": "Down", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "dimensionA": "Delhi" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - }, - { - "group": { - "dimension": { - "dimensionA": "Koltaka" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } + "traceparent": "00-69fc415e511b0d4fb19635ffa257b94b-fcc1a61d5e857d4e-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" ], - "seriesOverrideConfigurations": [] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/5e6a2afb-1a94-4b9b-8d2e-2a1c2423d3ce", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e83d161eef249042b7ded6b7ded01eef-9808eaa47407cc4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "75eb0093b1131ed02720342bb7d687c3", + "x-ms-client-request-id": "ec3f3d8ee61d23fe2ffc73584c8ab477", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e54095b8-ca65-43b9-a2d2-a274603ccbe8", + "apim-request-id": "f6321b37-d857-4904-99ff-40d6814e211d", "Content-Length": "799", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:23 GMT", + "Date": "Thu, 17 Jun 2021 21:32:15 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "107", - "x-request-id": "e54095b8-ca65-43b9-a2d2-a274603ccbe8" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5142", + "X-Request-ID": "f6321b37-d857-4904-99ff-40d6814e211d" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "5e6a2afb-1a94-4b9b-8d2e-2a1c2423d3ce", + "anomalyDetectionConfigurationId": "3e91bd3e-19ef-4e87-8a28-38d736bf5d6a", "name": "configLEooYU4b", "description": "", - "metricId": "47799fe8-b90d-4a47-8942-76c88c17f089", + "metricId": "bd343314-cbee-4907-b753-a0c1ec6b9a33", "wholeMetricConfiguration": { "hardThresholdCondition": { "lowerBound": 10.0, @@ -334,7 +270,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -353,52 +289,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/5e6a2afb-1a94-4b9b-8d2e-2a1c2423d3ce", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/3e91bd3e-19ef-4e87-8a28-38d736bf5d6a", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f67ee6e5c952643b4de3e9ea197c861-a3e60eb16b559d4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-e67995f83c06c34eb7488e8926e763a7-c9d533e6d98d544a-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "6cd5769bfec2f7e9fbfa606294c7ab0e", + "x-ms-client-request-id": "75eb0093b1131ed02720342bb7d687c3", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "1e3d63fc-d9f0-4e31-a556-41598bdbb06d", + "apim-request-id": "02c6d4ea-f87f-4cdf-aee8-9a0899d2345d", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:24 GMT", + "Date": "Thu, 17 Jun 2021 21:32:15 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "105", - "x-request-id": "1e3d63fc-d9f0-4e31-a556-41598bdbb06d" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "220", + "X-Request-ID": "02c6d4ea-f87f-4cdf-aee8-9a0899d2345d" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/89acbfe2-4374-498f-81db-763e2a0ec51f", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/055605b7-7420-4a9f-9358-8f00b2c01636", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0df0bf662d672945823d8f9597e93922-a5019dd915d4c240-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f01b26a8cbf86346b31e8cd1b013a819-750ea48245af444d-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "5b34a5476c9bdd456c20c5fdb1d36b59", + "x-ms-client-request-id": "6cd5769bfec2f7e9fbfa606294c7ab0e", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "dbadf5b3-45d7-4a61-910d-66f650ed6ea2", + "apim-request-id": "a62fc18a-b08a-45c1-b879-c04991a87bd8", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:24 GMT", + "Date": "Thu, 17 Jun 2021 21:32:22 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "362", - "x-request-id": "dbadf5b3-45d7-4a61-910d-66f650ed6ea2" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5390", + "X-Request-ID": "a62fc18a-b08a-45c1-b879-c04991a87bd8" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditionsAsync.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditionsAsync.json index 481a4130fd9b7..bb84ea038e91d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditionsAsync.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/CreateAndGetDetectionConfigurationWithSeriesGroupConditionsAsync.json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9ec6949800caca4a8604d6be9e2d8241-600db8eef43f7e47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2f8d4bab5e4fe049b78f2701c4f59a27-572f8174c101d94e-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "2042946b9f86aaeecd515698e28e6fc0", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "28346e4b-5975-4240-adae-9d66982768eb", + "apim-request-id": "7f0b2e19-1fd5-4e2d-80f0-5b2d78a494aa", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:48 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b79a3e9d-ddd8-41b7-a617-6b597cebdcbd", + "Date": "Thu, 17 Jun 2021 21:32:33 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/34cacf5a-7f6d-462c-a056-6ef7d3f631b2", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "561", - "x-request-id": "28346e4b-5975-4240-adae-9d66982768eb" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "464", + "X-Request-ID": "7f0b2e19-1fd5-4e2d-80f0-5b2d78a494aa" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b79a3e9d-ddd8-41b7-a617-6b597cebdcbd", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/34cacf5a-7f6d-462c-a056-6ef7d3f631b2", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9ec6949800caca4a8604d6be9e2d8241-1b610ab5626a7b44-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2f8d4bab5e4fe049b78f2701c4f59a27-35e3de9883423449-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "7b6fed7b4fbe189d44864c1970c02ed4", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "e572977d-ccbe-417c-a163-751ae5fbda78", + "apim-request-id": "148e1556-8453-407c-9a2c-43fe2f46bd37", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:48 GMT", + "Date": "Thu, 17 Jun 2021 21:32:34 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "148", - "x-request-id": "e572977d-ccbe-417c-a163-751ae5fbda78" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "161", + "X-Request-ID": "148e1556-8453-407c-9a2c-43fe2f46bd37" }, "ResponseBody": { - "dataFeedId": "b79a3e9d-ddd8-41b7-a617-6b597cebdcbd", + "dataFeedId": "34cacf5a-7f6d-462c-a056-6ef7d3f631b2", "dataFeedName": "dataFeed1oRulW2B", "metrics": [ { - "metricId": "8be9a9b4-fdd6-4e9b-90dd-6fe1a069f9bb", + "metricId": "2efa4fd3-a49a-4065-822c-3199377df307", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:03:48Z", + "createdTime": "2021-06-17T21:32:34Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,15 +139,18 @@ "Content-Length": "663", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-757c9605a910894a8cba0a43d508d619-4e186e01868efb4a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-a769ca3b24ac2c43a2578471b2f23cef-fd8bb960112d1044-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "1de9a97b72e509a4b385da9afd0aa91b", "x-ms-return-client-request-id": "true" }, "RequestBody": { "name": "configQ9DLUXVw", - "metricId": "8be9a9b4-fdd6-4e9b-90dd-6fe1a069f9bb", + "metricId": "2efa4fd3-a49a-4065-822c-3199377df307", "wholeMetricConfiguration": { "hardThresholdCondition": { "lowerBound": 10, @@ -171,7 +180,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -189,122 +198,49 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "97b17918-38df-405d-a0ed-0690333e6270", + "apim-request-id": "615df0a3-d15f-43ce-b89e-6f9571341c3c", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:48 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/98a12db0-fd27-433c-9538-8ecff1e46447", + "Date": "Thu, 17 Jun 2021 21:32:34 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/4e7f0b49-be32-402c-bed3-bb21a12205e2", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "184", - "x-request-id": "97b17918-38df-405d-a0ed-0690333e6270" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "250", + "X-Request-ID": "615df0a3-d15f-43ce-b89e-6f9571341c3c" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/98a12db0-fd27-433c-9538-8ecff1e46447", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/4e7f0b49-be32-402c-bed3-bb21a12205e2", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-757c9605a910894a8cba0a43d508d619-21adcf78b15e6c49-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "ffdc2af6d5530d392282a544166c7116", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "f8e5274a-8e12-45d7-9e76-53c296b4415f", - "Content-Length": "799", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:48 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "84", - "x-request-id": "f8e5274a-8e12-45d7-9e76-53c296b4415f" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "98a12db0-fd27-433c-9538-8ecff1e46447", - "name": "configQ9DLUXVw", - "description": "", - "metricId": "8be9a9b4-fdd6-4e9b-90dd-6fe1a069f9bb", - "wholeMetricConfiguration": { - "hardThresholdCondition": { - "lowerBound": 10.0, - "anomalyDetectorDirection": "Down", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "dimensionA": "Delhi" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - }, - { - "group": { - "dimension": { - "dimensionA": "Koltaka" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } + "traceparent": "00-a769ca3b24ac2c43a2578471b2f23cef-9013a1bd87c29f44-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" ], - "seriesOverrideConfigurations": [] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/98a12db0-fd27-433c-9538-8ecff1e46447", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e3f1dba3525f7840a76b77dbcc108398-ace009addb260341-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "15ffb7318066d133e14266eae594d6e7", + "x-ms-client-request-id": "ffdc2af6d5530d392282a544166c7116", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "8acabc6e-f2ca-4e35-b540-e47ef8bf4eab", + "apim-request-id": "436eaa56-2235-4690-ba22-834a7acc7870", "Content-Length": "799", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:48 GMT", + "Date": "Thu, 17 Jun 2021 21:32:34 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "85", - "x-request-id": "8acabc6e-f2ca-4e35-b540-e47ef8bf4eab" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "87", + "X-Request-ID": "436eaa56-2235-4690-ba22-834a7acc7870" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "98a12db0-fd27-433c-9538-8ecff1e46447", + "anomalyDetectionConfigurationId": "4e7f0b49-be32-402c-bed3-bb21a12205e2", "name": "configQ9DLUXVw", "description": "", - "metricId": "8be9a9b4-fdd6-4e9b-90dd-6fe1a069f9bb", + "metricId": "2efa4fd3-a49a-4065-822c-3199377df307", "wholeMetricConfiguration": { "hardThresholdCondition": { "lowerBound": 10.0, @@ -334,7 +270,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -353,52 +289,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/98a12db0-fd27-433c-9538-8ecff1e46447", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/4e7f0b49-be32-402c-bed3-bb21a12205e2", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-4001d80e478d4440995052ded5d90aa0-51b246f9d2712a4c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-7766a5c2feb2ad48b802e861af1f1e91-e105a055731b204c-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "250c5bf4bc88a6656fdcfa62cd60f246", + "x-ms-client-request-id": "15ffb7318066d133e14266eae594d6e7", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "507dbbeb-1dac-40a5-b510-ad65cbc7646d", + "apim-request-id": "bbcda99d-aa11-4088-ac36-dd2ee7b8399c", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:48 GMT", + "Date": "Thu, 17 Jun 2021 21:32:35 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "103", - "x-request-id": "507dbbeb-1dac-40a5-b510-ad65cbc7646d" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "110", + "X-Request-ID": "bbcda99d-aa11-4088-ac36-dd2ee7b8399c" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/b79a3e9d-ddd8-41b7-a617-6b597cebdcbd", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/34cacf5a-7f6d-462c-a056-6ef7d3f631b2", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-05b79261bc229d4382f8784fa663e5d8-9609010eabf06d4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-3837501d1eec3147b33eeebe070e6214-27b49d43f4d8fb42-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "4669c313930a76b4f60a1e106e4e278e", + "x-ms-client-request-id": "250c5bf4bc88a6656fdcfa62cd60f246", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "e6ecd238-9eef-4d55-b7f7-c75759fbeef5", + "apim-request-id": "65591914-f787-451d-a8e9-98c0fb6205ec", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:49 GMT", + "Date": "Thu, 17 Jun 2021 21:32:35 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "321", - "x-request-id": "e6ecd238-9eef-4d55-b7f7-c75759fbeef5" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "331", + "X-Request-ID": "65591914-f787-451d-a8e9-98c0fb6205ec" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False).json index 5dfe8e5ae26f4..88eb266ce1ae9 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False).json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-28d37da26c31874a94fef0dc82bd8363-897af67675186c44-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-32c34aa5a8ef974bbf8709187d71ee0f-58ba97efdf57964a-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "b0972cb3753e61bbd46851d3bb5ed2ea", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "1bf82475-a3fd-48e7-8a0b-ee40920c9db0", + "apim-request-id": "eb30ac93-3956-45fb-95d7-41cce88475be", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:36 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/be1cd0a2-af3a-447a-9291-f3e8807ba525", + "Date": "Thu, 17 Jun 2021 21:31:33 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69e4bfd2-863b-45c8-ae34-69a03ed30cda", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "527", - "x-request-id": "1bf82475-a3fd-48e7-8a0b-ee40920c9db0" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "474", + "X-Request-ID": "eb30ac93-3956-45fb-95d7-41cce88475be" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/be1cd0a2-af3a-447a-9291-f3e8807ba525", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69e4bfd2-863b-45c8-ae34-69a03ed30cda", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-28d37da26c31874a94fef0dc82bd8363-05142c725a6cf140-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-32c34aa5a8ef974bbf8709187d71ee0f-3fae728d84a8b449-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "a148f39f3b06e0202a691c6e132ecf6c", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "3ae767d2-0b3b-4054-9c9e-f41e79c136d7", + "apim-request-id": "086ddaa4-7a3d-4ad2-b311-72e0acd6d275", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:36 GMT", + "Date": "Thu, 17 Jun 2021 21:31:33 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "168", - "x-request-id": "3ae767d2-0b3b-4054-9c9e-f41e79c136d7" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "189", + "X-Request-ID": "086ddaa4-7a3d-4ad2-b311-72e0acd6d275" }, "ResponseBody": { - "dataFeedId": "be1cd0a2-af3a-447a-9291-f3e8807ba525", + "dataFeedId": "69e4bfd2-863b-45c8-ae34-69a03ed30cda", "dataFeedName": "dataFeedS8dmYdfe", "metrics": [ { - "metricId": "9f18ac31-5fab-4b2d-8324-3470beb29af9", + "metricId": "1102ea3f-a76b-4906-b57e-1f976768486b", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:03:36Z", + "createdTime": "2021-06-17T21:31:33Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,15 +139,18 @@ "Content-Length": "872", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-93b0aae2eeddfd438965ca34d5b3a1fe-f9c201a6c6e45b44-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2be23f3bff99a44a92c47227ac220207-0ad4238e1c1ae447-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "ffa1e775cca136fca5aa66270bb49c77", "x-ms-return-client-request-id": "true" }, "RequestBody": { "name": "configvAKZrVew", - "metricId": "9f18ac31-5fab-4b2d-8324-3470beb29af9", + "metricId": "1102ea3f-a76b-4906-b57e-1f976768486b", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -165,7 +174,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -201,133 +210,49 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "8e8352e2-7562-4fef-9dfe-b98f8a84ce1f", + "apim-request-id": "43cea541-dbba-4973-a92f-8fa2cbfdd348", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:42 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/d2639036-b318-4d03-a03d-e3982e8b9f82", + "Date": "Thu, 17 Jun 2021 21:31:34 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/dd778809-6f70-4179-b39b-ac1e099dd02a", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5214", - "x-request-id": "8e8352e2-7562-4fef-9dfe-b98f8a84ce1f" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "346", + "X-Request-ID": "43cea541-dbba-4973-a92f-8fa2cbfdd348" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/d2639036-b318-4d03-a03d-e3982e8b9f82", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/dd778809-6f70-4179-b39b-ac1e099dd02a", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-93b0aae2eeddfd438965ca34d5b3a1fe-3c12435e5f0e954d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "d586b60b4c58a64e99e5d1aa0f0a2662", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "1cc5acc0-051c-4c30-9462-069ce2b78b0e", - "Content-Length": "978", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:42 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "87", - "x-request-id": "1cc5acc0-051c-4c30-9462-069ce2b78b0e" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "d2639036-b318-4d03-a03d-e3982e8b9f82", - "name": "configvAKZrVew", - "description": "", - "metricId": "9f18ac31-5fab-4b2d-8324-3470beb29af9", - "wholeMetricConfiguration": { - "conditionOperator": "OR", - "smartDetectionCondition": { - "sensitivity": 60.0, - "anomalyDetectorDirection": "Up", - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 10.0, - "anomalyDetectorDirection": "Down", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "dimensionA": "Koltaka" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } + "traceparent": "00-2be23f3bff99a44a92c47227ac220207-a43eb169c40eff4e-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" ], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "dimensionA": "Delhi", - "dimensionB": "Handmade" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - } - ] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/d2639036-b318-4d03-a03d-e3982e8b9f82", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0f5fa7e317807442928a5f89595a3510-fa3ac3c9d11d5a4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "1f2cc135219a5e3e6ce6c868c8a7614d", + "x-ms-client-request-id": "d586b60b4c58a64e99e5d1aa0f0a2662", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "86897cf6-f022-444c-8640-4416d1646bc0", + "apim-request-id": "b7d1e4ce-096b-4a95-b282-3a45bceea3c1", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:42 GMT", + "Date": "Thu, 17 Jun 2021 21:31:39 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "96", - "x-request-id": "86897cf6-f022-444c-8640-4416d1646bc0" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5242", + "X-Request-ID": "b7d1e4ce-096b-4a95-b282-3a45bceea3c1" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "d2639036-b318-4d03-a03d-e3982e8b9f82", + "anomalyDetectionConfigurationId": "dd778809-6f70-4179-b39b-ac1e099dd02a", "name": "configvAKZrVew", "description": "", - "metricId": "9f18ac31-5fab-4b2d-8324-3470beb29af9", + "metricId": "1102ea3f-a76b-4906-b57e-1f976768486b", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -351,7 +276,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -387,17 +312,20 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/d2639036-b318-4d03-a03d-e3982e8b9f82", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/dd778809-6f70-4179-b39b-ac1e099dd02a", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Content-Length": "839", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-36f4c9aab2e31a438e73a8157e7e7079-0c2b8ef6bf55fa43-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-72fe3e742219b341ace944e62e20eec8-c85a6dc5372cf441-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "0cbbd774e8b6282e99fb65bcfb51279b", + "x-ms-client-request-id": "1f2cc135219a5e3e6ce6c868c8a7614d", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -426,7 +354,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -462,20 +390,20 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "2930b98a-d590-443a-b07a-ad9ba92bb8ad", + "apim-request-id": "d99bd16c-72a0-40cc-9045-433bbd5cbafa", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:43 GMT", + "Date": "Thu, 17 Jun 2021 21:31:44 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "245", - "x-request-id": "2930b98a-d590-443a-b07a-ad9ba92bb8ad" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5437", + "X-Request-ID": "d99bd16c-72a0-40cc-9045-433bbd5cbafa" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "d2639036-b318-4d03-a03d-e3982e8b9f82", + "anomalyDetectionConfigurationId": "dd778809-6f70-4179-b39b-ac1e099dd02a", "name": "configvAKZrVew", "description": "", - "metricId": "9f18ac31-5fab-4b2d-8324-3470beb29af9", + "metricId": "1102ea3f-a76b-4906-b57e-1f976768486b", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -499,7 +427,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -535,52 +463,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/d2639036-b318-4d03-a03d-e3982e8b9f82", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/dd778809-6f70-4179-b39b-ac1e099dd02a", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-bf8efb24acb7584e9058d537420f23a6-3d79870050bdaf4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-d5da5566cecaf041941515e14a770d4a-81ae2387e3a48748-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "49f103837d88e9dd7727697283e5ddf1", + "x-ms-client-request-id": "0cbbd774e8b6282e99fb65bcfb51279b", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "befda5af-44f6-45cf-9ffc-e31c7a564c90", + "apim-request-id": "faaaf2cb-3763-4d1c-b123-685fbf6e8196", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:43 GMT", + "Date": "Thu, 17 Jun 2021 21:31:50 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "104", - "x-request-id": "befda5af-44f6-45cf-9ffc-e31c7a564c90" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5223", + "X-Request-ID": "faaaf2cb-3763-4d1c-b123-685fbf6e8196" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/be1cd0a2-af3a-447a-9291-f3e8807ba525", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/69e4bfd2-863b-45c8-ae34-69a03ed30cda", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a522de55b76c6d4a919c7778d2ddcb3c-6ab19c933632c145-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-a01892038880f04e8d84b94f417c2261-6b42ba4c9ea75240-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "37368383194f4dac9303869fbc82631a", + "x-ms-client-request-id": "49f103837d88e9dd7727697283e5ddf1", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "a3d39401-b802-45a5-9ddf-8d1b9433931e", + "apim-request-id": "98be0caf-3feb-43ab-a84c-c093a4f68ba0", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:43 GMT", + "Date": "Thu, 17 Jun 2021 21:31:51 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "307", - "x-request-id": "a3d39401-b802-45a5-9ddf-8d1b9433931e" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "422", + "X-Request-ID": "98be0caf-3feb-43ab-a84c-c093a4f68ba0" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False)Async.json index f4777f68329c1..490b7d3776e7d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(False)Async.json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-71ae8e508b88be44a16c8a28afaca374-1874a03bec3db640-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ab3d47b437f8a34494811f0608dd7764-e671c900832e3547-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "7840d24d9997aafc09851a1a4625dd06", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "93991dc0-a7c6-4395-a4b5-24abf07e9c64", + "apim-request-id": "7d99e6f5-bed6-4b7b-b83f-5a131945abe8", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:09 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f0546f-c843-496c-a3d8-0676fa795cb0", + "Date": "Thu, 17 Jun 2021 21:32:29 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88e6e5ea-67d0-4824-bbee-20a5a469b5eb", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "467", - "x-request-id": "93991dc0-a7c6-4395-a4b5-24abf07e9c64" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "434", + "X-Request-ID": "7d99e6f5-bed6-4b7b-b83f-5a131945abe8" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f0546f-c843-496c-a3d8-0676fa795cb0", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88e6e5ea-67d0-4824-bbee-20a5a469b5eb", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-71ae8e508b88be44a16c8a28afaca374-42765ec0543e724f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-ab3d47b437f8a34494811f0608dd7764-03df6919f714ce4a-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "6762f3a7ddc97f158dba8de0aa87e4c6", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "4b303a6a-f090-4df0-b16b-61f35ab07d8f", + "apim-request-id": "14fb4087-ae96-477a-a169-524f5bec8a36", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:09 GMT", + "Date": "Thu, 17 Jun 2021 21:32:30 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "203", - "x-request-id": "4b303a6a-f090-4df0-b16b-61f35ab07d8f" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "150", + "X-Request-ID": "14fb4087-ae96-477a-a169-524f5bec8a36" }, "ResponseBody": { - "dataFeedId": "e2f0546f-c843-496c-a3d8-0676fa795cb0", + "dataFeedId": "88e6e5ea-67d0-4824-bbee-20a5a469b5eb", "dataFeedName": "dataFeed9OR03UcA", "metrics": [ { - "metricId": "9feee10a-2367-4f26-af0b-64e9d4796ef1", + "metricId": "e41bd543-96f7-4852-a5d5-0ce49383951a", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:04:09Z", + "createdTime": "2021-06-17T21:32:30Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,15 +139,18 @@ "Content-Length": "872", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-23d55e1aec0e994496003f5d4f52ef8b-c64f973563400e47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-a3f24c6e3f2c4949b3bbd57c119dd715-5261a0349de88246-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "249ae5a842d0bbb90f619aea70027d70", "x-ms-return-client-request-id": "true" }, "RequestBody": { "name": "configEjjpJh0Q", - "metricId": "9feee10a-2367-4f26-af0b-64e9d4796ef1", + "metricId": "e41bd543-96f7-4852-a5d5-0ce49383951a", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -165,7 +174,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -201,133 +210,49 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "ee377802-b13f-493c-a549-4e89424d0474", + "apim-request-id": "ec0ee5a3-91c5-4ed0-ac9d-38cd1038140c", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:09 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23356a11-2281-441c-8dc9-b16f5e09e1df", + "Date": "Thu, 17 Jun 2021 21:32:30 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/22805aa1-25fd-4f7d-9940-1960675cce5a", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "183", - "x-request-id": "ee377802-b13f-493c-a549-4e89424d0474" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "245", + "X-Request-ID": "ec0ee5a3-91c5-4ed0-ac9d-38cd1038140c" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23356a11-2281-441c-8dc9-b16f5e09e1df", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/22805aa1-25fd-4f7d-9940-1960675cce5a", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-23d55e1aec0e994496003f5d4f52ef8b-85af4dc5dad4d048-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "dcebc1bd1c0b8200a1541dae1760e4fe", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "64912434-0f19-49af-b3e1-3092f9ef37dc", - "Content-Length": "978", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:09 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "92", - "x-request-id": "64912434-0f19-49af-b3e1-3092f9ef37dc" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "23356a11-2281-441c-8dc9-b16f5e09e1df", - "name": "configEjjpJh0Q", - "description": "", - "metricId": "9feee10a-2367-4f26-af0b-64e9d4796ef1", - "wholeMetricConfiguration": { - "conditionOperator": "OR", - "smartDetectionCondition": { - "sensitivity": 60.0, - "anomalyDetectorDirection": "Up", - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 10.0, - "anomalyDetectorDirection": "Down", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "dimensionA": "Koltaka" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } + "traceparent": "00-a3f24c6e3f2c4949b3bbd57c119dd715-a6fe53771b2d694b-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" ], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "dimensionA": "Delhi", - "dimensionB": "Handmade" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - } - ] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23356a11-2281-441c-8dc9-b16f5e09e1df", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-972a5d39b07dd64082073796c52a0ff0-c8561e098677844a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "e4bf1042f0424aaf01d2d048ecf955f9", + "x-ms-client-request-id": "dcebc1bd1c0b8200a1541dae1760e4fe", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "26b4f58e-62ca-419a-9a32-5b3f50a08cee", + "apim-request-id": "0ca6ef0e-c230-44d2-8d51-098bf7960711", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:09 GMT", + "Date": "Thu, 17 Jun 2021 21:32:30 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "83", - "x-request-id": "26b4f58e-62ca-419a-9a32-5b3f50a08cee" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "93", + "X-Request-ID": "0ca6ef0e-c230-44d2-8d51-098bf7960711" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "23356a11-2281-441c-8dc9-b16f5e09e1df", + "anomalyDetectionConfigurationId": "22805aa1-25fd-4f7d-9940-1960675cce5a", "name": "configEjjpJh0Q", "description": "", - "metricId": "9feee10a-2367-4f26-af0b-64e9d4796ef1", + "metricId": "e41bd543-96f7-4852-a5d5-0ce49383951a", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -351,7 +276,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -387,17 +312,20 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23356a11-2281-441c-8dc9-b16f5e09e1df", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/22805aa1-25fd-4f7d-9940-1960675cce5a", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Content-Length": "839", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b6c179c5e19b9c469142b08fad04c2aa-eac029a07aba6b42-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-730be51b23176f458c9830dbb5204237-4b866e42ec409e4d-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "61c09d1ad5bd8c46e417837b240aa4af", + "x-ms-client-request-id": "e4bf1042f0424aaf01d2d048ecf955f9", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -426,7 +354,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -462,20 +390,20 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "43ac9534-9c72-41bf-a8bd-c1d23dd42ae2", + "apim-request-id": "539d4a15-75e4-4671-b374-ecd9d75e9a91", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:10 GMT", + "Date": "Thu, 17 Jun 2021 21:32:30 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "228", - "x-request-id": "43ac9534-9c72-41bf-a8bd-c1d23dd42ae2" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "290", + "X-Request-ID": "539d4a15-75e4-4671-b374-ecd9d75e9a91" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "23356a11-2281-441c-8dc9-b16f5e09e1df", + "anomalyDetectionConfigurationId": "22805aa1-25fd-4f7d-9940-1960675cce5a", "name": "configEjjpJh0Q", "description": "", - "metricId": "9feee10a-2367-4f26-af0b-64e9d4796ef1", + "metricId": "e41bd543-96f7-4852-a5d5-0ce49383951a", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -499,7 +427,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -535,52 +463,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23356a11-2281-441c-8dc9-b16f5e09e1df", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/22805aa1-25fd-4f7d-9940-1960675cce5a", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-f33146d78dddb74289f4b0385f641d99-c6c7cc8833340f45-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b794e187f462324a8ea32675e10062c1-12d3e6a56ce4bb4e-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "5fa89b7d9843cc2d11a0da394bb895a8", + "x-ms-client-request-id": "61c09d1ad5bd8c46e417837b240aa4af", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "db73e448-0fab-4798-8d83-3b9d377cf1f2", + "apim-request-id": "78117764-51f1-4fae-8ea7-30a995ee23ea", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:10 GMT", + "Date": "Thu, 17 Jun 2021 21:32:31 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "99", - "x-request-id": "db73e448-0fab-4798-8d83-3b9d377cf1f2" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "118", + "X-Request-ID": "78117764-51f1-4fae-8ea7-30a995ee23ea" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/e2f0546f-c843-496c-a3d8-0676fa795cb0", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/88e6e5ea-67d0-4824-bbee-20a5a469b5eb", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-456b222dc189594bbdacfbc128421787-c544c72644eefd4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-9578d6743ec14f48af5cf4a905341ca4-9edc50bda7a63e44-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "799424fe839f6c41c933002a6d3325f6", + "x-ms-client-request-id": "5fa89b7d9843cc2d11a0da394bb895a8", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "b04225d8-6a91-440d-9c98-2d1ee8e518a8", + "apim-request-id": "21185eaa-3128-495c-9f08-4e13088c954e", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:10 GMT", + "Date": "Thu, 17 Jun 2021 21:32:31 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "291", - "x-request-id": "b04225d8-6a91-440d-9c98-2d1ee8e518a8" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "309", + "X-Request-ID": "21185eaa-3128-495c-9f08-4e13088c954e" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True).json index 334ece663010e..b8fa3411b2709 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True).json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-fa38a27c8c49e0429328227e23a858e8-c672a022d3b94e47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-d43705e498a65b468e39d91fe7ac75c2-bb2a6f23460f204f-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "18a3d941380a038cf555a18dc01b1d16", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "97ee45a7-d6d8-4fbe-ba90-cee087ba604d", + "apim-request-id": "ea44812b-09fa-4904-9f8f-ba436662ff21", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:34 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ebc756ac-28e6-48c2-a2a8-5ae05a54d402", + "Date": "Thu, 17 Jun 2021 21:31:09 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a15de901-6e97-4ca4-9449-c0f7bec02a96", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "431", - "x-request-id": "97ee45a7-d6d8-4fbe-ba90-cee087ba604d" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "772", + "X-Request-ID": "ea44812b-09fa-4904-9f8f-ba436662ff21" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ebc756ac-28e6-48c2-a2a8-5ae05a54d402", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a15de901-6e97-4ca4-9449-c0f7bec02a96", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-fa38a27c8c49e0429328227e23a858e8-4761577565860d45-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-d43705e498a65b468e39d91fe7ac75c2-8521a354b02ced4e-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "faac52bf6e56e4ed880433800aa248b0", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "a9110aa0-d6d8-4ccd-8ced-7f03c1df3cb6", + "apim-request-id": "c52c8ae0-fe3a-4c8e-9e46-d18d08d0f0e4", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:34 GMT", + "Date": "Thu, 17 Jun 2021 21:31:14 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "165", - "x-request-id": "a9110aa0-d6d8-4ccd-8ced-7f03c1df3cb6" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5241", + "X-Request-ID": "c52c8ae0-fe3a-4c8e-9e46-d18d08d0f0e4" }, "ResponseBody": { - "dataFeedId": "ebc756ac-28e6-48c2-a2a8-5ae05a54d402", + "dataFeedId": "a15de901-6e97-4ca4-9449-c0f7bec02a96", "dataFeedName": "dataFeedvvfJ7FgJ", "metrics": [ { - "metricId": "5f58c8a4-dd46-4c17-9557-0d2d386d73f9", + "metricId": "de19d817-5caf-4b53-b31b-8b4521f92e58", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:03:34Z", + "createdTime": "2021-06-17T21:31:09Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,15 +139,18 @@ "Content-Length": "872", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0e9ed9af1473884c877d97b5974044dc-683d74d82e657140-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-5bba9ada6ffc734eba2807b1a45a5454-34f1ea256e2fca4f-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "d7ea94c7664bf36d4d60a5e758de95d2", "x-ms-return-client-request-id": "true" }, "RequestBody": { "name": "configGwRKjMqC", - "metricId": "5f58c8a4-dd46-4c17-9557-0d2d386d73f9", + "metricId": "de19d817-5caf-4b53-b31b-8b4521f92e58", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -165,7 +174,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -201,133 +210,49 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "0bc10ff2-b6ec-4233-9c9f-9394c82879e6", + "apim-request-id": "f005d118-3a90-4e7b-a121-683d7d9837a3", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:34 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ed243ef8-8ac2-4fc3-be47-4038b290dbd7", + "Date": "Thu, 17 Jun 2021 21:31:19 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ac77018c-bc72-414b-8c0e-058e1cb4e287", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "172", - "x-request-id": "0bc10ff2-b6ec-4233-9c9f-9394c82879e6" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5298", + "X-Request-ID": "f005d118-3a90-4e7b-a121-683d7d9837a3" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ed243ef8-8ac2-4fc3-be47-4038b290dbd7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ac77018c-bc72-414b-8c0e-058e1cb4e287", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-0e9ed9af1473884c877d97b5974044dc-8c4419dc0fbbcb44-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "0590beeb0b0552f80df0448824b137dc", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "b12e7e7f-64bf-442a-996b-bd46fe7001d0", - "Content-Length": "978", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:34 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "92", - "x-request-id": "b12e7e7f-64bf-442a-996b-bd46fe7001d0" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "ed243ef8-8ac2-4fc3-be47-4038b290dbd7", - "name": "configGwRKjMqC", - "description": "", - "metricId": "5f58c8a4-dd46-4c17-9557-0d2d386d73f9", - "wholeMetricConfiguration": { - "conditionOperator": "OR", - "smartDetectionCondition": { - "sensitivity": 60.0, - "anomalyDetectorDirection": "Up", - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 10.0, - "anomalyDetectorDirection": "Down", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "dimensionA": "Koltaka" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } + "traceparent": "00-5bba9ada6ffc734eba2807b1a45a5454-e8ab68f701f73347-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" ], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "dimensionA": "Delhi", - "dimensionB": "Handmade" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - } - ] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ed243ef8-8ac2-4fc3-be47-4038b290dbd7", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-ed3704f5a79e8345a95ea6a04042752b-579aafc08640a64a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "c23290e215832298963f32aafc61586a", + "x-ms-client-request-id": "0590beeb0b0552f80df0448824b137dc", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "bb9eb037-b910-44e5-abbc-0d72368ddebe", + "apim-request-id": "2ed06009-7bcc-4dd2-a7f8-c7125073859e", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:34 GMT", + "Date": "Thu, 17 Jun 2021 21:31:26 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "89", - "x-request-id": "bb9eb037-b910-44e5-abbc-0d72368ddebe" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5514", + "X-Request-ID": "2ed06009-7bcc-4dd2-a7f8-c7125073859e" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "ed243ef8-8ac2-4fc3-be47-4038b290dbd7", + "anomalyDetectionConfigurationId": "ac77018c-bc72-414b-8c0e-058e1cb4e287", "name": "configGwRKjMqC", "description": "", - "metricId": "5f58c8a4-dd46-4c17-9557-0d2d386d73f9", + "metricId": "de19d817-5caf-4b53-b31b-8b4521f92e58", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -351,7 +276,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -387,17 +312,20 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ed243ef8-8ac2-4fc3-be47-4038b290dbd7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ac77018c-bc72-414b-8c0e-058e1cb4e287", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Content-Length": "839", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a948c1949c219a469e1031a3afdbf7a9-39160592d6d83949-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-835be1b845a8fc469159d71d2f296c86-30bf02e141bf8c46-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "208024a26953bc169b97ca5b21e5cf9c", + "x-ms-client-request-id": "c23290e215832298963f32aafc61586a", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -426,7 +354,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -462,20 +390,20 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "f463dced-6c51-4bc4-bd91-b419373e7c36", + "apim-request-id": "9210289b-d9f4-4e10-99c2-16e106b3b131", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:03:35 GMT", + "Date": "Thu, 17 Jun 2021 21:31:31 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "245", - "x-request-id": "f463dced-6c51-4bc4-bd91-b419373e7c36" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5395", + "X-Request-ID": "9210289b-d9f4-4e10-99c2-16e106b3b131" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "ed243ef8-8ac2-4fc3-be47-4038b290dbd7", + "anomalyDetectionConfigurationId": "ac77018c-bc72-414b-8c0e-058e1cb4e287", "name": "configGwRKjMqC", "description": "", - "metricId": "5f58c8a4-dd46-4c17-9557-0d2d386d73f9", + "metricId": "de19d817-5caf-4b53-b31b-8b4521f92e58", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -499,7 +427,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -535,52 +463,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ed243ef8-8ac2-4fc3-be47-4038b290dbd7", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ac77018c-bc72-414b-8c0e-058e1cb4e287", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-5744223d09970046a817e9ba6ec794f0-880ae65fcf2a1242-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-d308061e39009c498df9e2cbc44be72e-ade365d018425044-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "c704c929d3abd64e256d6fc5d84e56ac", + "x-ms-client-request-id": "208024a26953bc169b97ca5b21e5cf9c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "5e3694aa-52bc-4d5b-9585-826321b965bc", + "apim-request-id": "77097ec1-1eac-44c9-aa23-00fb10931016", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:35 GMT", + "Date": "Thu, 17 Jun 2021 21:31:32 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "92", - "x-request-id": "5e3694aa-52bc-4d5b-9585-826321b965bc" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "180", + "X-Request-ID": "77097ec1-1eac-44c9-aa23-00fb10931016" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/ebc756ac-28e6-48c2-a2a8-5ae05a54d402", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/a15de901-6e97-4ca4-9449-c0f7bec02a96", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-71febfb221c4744a9f9ac4d99391b1dc-d9a566994d4dc346-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-6478f6800e50b143a4b0c18df03cb6b2-a8c2ee39423f1c43-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "ffe6da9716317989797626eb4a3d00b1", + "x-ms-client-request-id": "c704c929d3abd64e256d6fc5d84e56ac", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "0bfc902a-9b20-48a0-9c0c-1dd43ce0108f", + "apim-request-id": "d8270380-013d-4c2a-8972-8a1cd03ed674", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:03:35 GMT", + "Date": "Thu, 17 Jun 2021 21:31:32 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "289", - "x-request-id": "0bfc902a-9b20-48a0-9c0c-1dd43ce0108f" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "385", + "X-Request-ID": "d8270380-013d-4c2a-8972-8a1cd03ed674" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True)Async.json index 1970544ac0e2e..4fc8e10905ae8 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionConfigurationLiveTests/UpdateDetectionConfigurationWithMinimumSetup(True)Async.json @@ -8,8 +8,11 @@ "Content-Length": "312", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-656abca2c279374891d7bff89ed5e367-60c1fa84c398774d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2f177fabbf409b4dbfda7b153054fdc7-07f4798544cf2249-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "44d33fe48170c13acd1c9736f8c740a4", "x-ms-return-client-request-id": "true" @@ -39,25 +42,28 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "09c038e1-750b-4c30-b36f-1cc56ad1911c", + "apim-request-id": "9a7ad82c-eb0c-4359-8ff9-7f6fb6376832", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:06 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1a8c5037-2fad-4a8a-ae40-4fe5bff82f14", + "Date": "Thu, 17 Jun 2021 21:32:22 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/cdb4e854-2370-4b98-a85e-979946c0b9fb", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "449", - "x-request-id": "09c038e1-750b-4c30-b36f-1cc56ad1911c" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "541", + "X-Request-ID": "9a7ad82c-eb0c-4359-8ff9-7f6fb6376832" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1a8c5037-2fad-4a8a-ae40-4fe5bff82f14", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/cdb4e854-2370-4b98-a85e-979946c0b9fb", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-656abca2c279374891d7bff89ed5e367-46463f5504ba6f4d-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-2f177fabbf409b4dbfda7b153054fdc7-8a7d9545e83c794d-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "d39d34622047a701a03d2883ef74e60c", "x-ms-return-client-request-id": "true" @@ -65,21 +71,21 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "7869406e-5c74-408a-88ef-a6a9ecd6bf42", + "apim-request-id": "a32eb62f-ecf3-49fe-8ab5-5df7d4b44f6c", "Content-Length": "1010", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:07 GMT", + "Date": "Thu, 17 Jun 2021 21:32:28 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "165", - "x-request-id": "7869406e-5c74-408a-88ef-a6a9ecd6bf42" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5278", + "X-Request-ID": "a32eb62f-ecf3-49fe-8ab5-5df7d4b44f6c" }, "ResponseBody": { - "dataFeedId": "1a8c5037-2fad-4a8a-ae40-4fe5bff82f14", + "dataFeedId": "cdb4e854-2370-4b98-a85e-979946c0b9fb", "dataFeedName": "dataFeedNBUpfLc4", "metrics": [ { - "metricId": "a02a3e1e-a512-46fa-8d90-39a7d6f0a475", + "metricId": "8cfae3f0-e910-4cba-99d9-769681ebdf8c", "metricName": "metric", "metricDisplayName": "metric", "metricDescription": "" @@ -116,7 +122,7 @@ "viewers": [], "creator": "foo@contoso.com", "status": "Active", - "createdTime": "2021-06-09T23:04:07Z", + "createdTime": "2021-06-17T21:32:22Z", "isAdmin": true, "actionLinkTemplate": "", "dataSourceParameter": { @@ -133,15 +139,18 @@ "Content-Length": "872", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-09a045093136064b94ad589c62c891ab-0d58771e3125ed47-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f756c5461db52a4f916a8d0de502e723-e478df6cb202ad49-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "5ff10b6921e4fe798a13820899891cc3", "x-ms-return-client-request-id": "true" }, "RequestBody": { "name": "configsuJALrSB", - "metricId": "a02a3e1e-a512-46fa-8d90-39a7d6f0a475", + "metricId": "8cfae3f0-e910-4cba-99d9-769681ebdf8c", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -165,7 +174,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -201,133 +210,49 @@ }, "StatusCode": 201, "ResponseHeaders": { - "apim-request-id": "2b0dc53e-91da-4eca-a1d9-7fba8bbcb908", + "apim-request-id": "9f83bec8-4ed9-469f-9b40-939730efcd32", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:07 GMT", - "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23303a63-4357-4fc5-8d77-0e95e20d86dd", + "Date": "Thu, 17 Jun 2021 21:32:28 GMT", + "Location": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ba5fbff4-d9a5-445d-9969-49d26b43ac9c", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "196", - "x-request-id": "2b0dc53e-91da-4eca-a1d9-7fba8bbcb908" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "267", + "X-Request-ID": "9f83bec8-4ed9-469f-9b40-939730efcd32" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23303a63-4357-4fc5-8d77-0e95e20d86dd", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ba5fbff4-d9a5-445d-9969-49d26b43ac9c", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-09a045093136064b94ad589c62c891ab-cc38e790f63e044b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-api-key": "Sanitized", - "x-ms-client-request-id": "33a42c3db65858d2358bf4716980e93d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "1b0fe2b0-19e3-4fe3-93ec-c80ada35d776", - "Content-Length": "978", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:07 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "93", - "x-request-id": "1b0fe2b0-19e3-4fe3-93ec-c80ada35d776" - }, - "ResponseBody": { - "anomalyDetectionConfigurationId": "23303a63-4357-4fc5-8d77-0e95e20d86dd", - "name": "configsuJALrSB", - "description": "", - "metricId": "a02a3e1e-a512-46fa-8d90-39a7d6f0a475", - "wholeMetricConfiguration": { - "conditionOperator": "OR", - "smartDetectionCondition": { - "sensitivity": 60.0, - "anomalyDetectorDirection": "Up", - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 10.0, - "anomalyDetectorDirection": "Down", - "suppressCondition": { - "minNumber": 1, - "minRatio": 2.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "dimensionA": "Koltaka" - } - }, - "changeThresholdCondition": { - "changePercentage": 40.0, - "shiftPoint": 12, - "anomalyDetectorDirection": "Up", - "withinRange": false, - "suppressCondition": { - "minNumber": 5, - "minRatio": 6.0 - } - } - } + "traceparent": "00-f756c5461db52a4f916a8d0de502e723-4e21fe2ec3b32643-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" ], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "dimensionA": "Delhi", - "dimensionB": "Handmade" - } - }, - "smartDetectionCondition": { - "sensitivity": 30.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 3, - "minRatio": 4.0 - } - } - } - ] - } - }, - { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23303a63-4357-4fc5-8d77-0e95e20d86dd", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-a9192a0b23cf864384e3bcd52e5e3969-38d794edba656744-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-api-key": "Sanitized", - "x-ms-client-request-id": "3b696fffa12f7ec3c429f8dbf2dd72b9", + "x-ms-client-request-id": "33a42c3db65858d2358bf4716980e93d", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "872fff5c-77f9-4b09-a1e2-b3e0ce5e831a", + "apim-request-id": "f33be7b3-60f4-4e61-b8d5-ba1f300d1e2d", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:07 GMT", + "Date": "Thu, 17 Jun 2021 21:32:28 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "89", - "x-request-id": "872fff5c-77f9-4b09-a1e2-b3e0ce5e831a" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "101", + "X-Request-ID": "f33be7b3-60f4-4e61-b8d5-ba1f300d1e2d" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "23303a63-4357-4fc5-8d77-0e95e20d86dd", + "anomalyDetectionConfigurationId": "ba5fbff4-d9a5-445d-9969-49d26b43ac9c", "name": "configsuJALrSB", "description": "", - "metricId": "a02a3e1e-a512-46fa-8d90-39a7d6f0a475", + "metricId": "8cfae3f0-e910-4cba-99d9-769681ebdf8c", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -351,7 +276,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -387,17 +312,20 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23303a63-4357-4fc5-8d77-0e95e20d86dd", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ba5fbff4-d9a5-445d-9969-49d26b43ac9c", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Content-Length": "839", "Content-Type": "application/merge-patch\u002Bjson", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b92b00835f4390489dd83cca5bd0ac2a-affbdc631495674f-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-1583a26f9e774044bedff8e8e68acd97-eadcf2328d1c904c-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "8f829a6a0180b3d539982a582d07950a", + "x-ms-client-request-id": "3b696fffa12f7ec3c429f8dbf2dd72b9", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -426,7 +354,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -462,20 +390,20 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "72cc4b87-dcd9-4f9c-87e8-982b31398681", + "apim-request-id": "55362ea1-77b0-46a7-8e2d-7d8b76680ac4", "Content-Length": "978", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 09 Jun 2021 23:04:08 GMT", + "Date": "Thu, 17 Jun 2021 21:32:28 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "260", - "x-request-id": "72cc4b87-dcd9-4f9c-87e8-982b31398681" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "314", + "X-Request-ID": "55362ea1-77b0-46a7-8e2d-7d8b76680ac4" }, "ResponseBody": { - "anomalyDetectionConfigurationId": "23303a63-4357-4fc5-8d77-0e95e20d86dd", + "anomalyDetectionConfigurationId": "ba5fbff4-d9a5-445d-9969-49d26b43ac9c", "name": "configsuJALrSB", "description": "", - "metricId": "a02a3e1e-a512-46fa-8d90-39a7d6f0a475", + "metricId": "8cfae3f0-e910-4cba-99d9-769681ebdf8c", "wholeMetricConfiguration": { "conditionOperator": "OR", "smartDetectionCondition": { @@ -499,7 +427,7 @@ { "group": { "dimension": { - "dimensionA": "Koltaka" + "dimensionA": "Kolkata" } }, "changeThresholdCondition": { @@ -535,52 +463,58 @@ } }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/23303a63-4357-4fc5-8d77-0e95e20d86dd", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/enrichment/anomalyDetection/configurations/ba5fbff4-d9a5-445d-9969-49d26b43ac9c", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-6ad443513fec3b458d6e8d3b1d53d89f-4a96126a10324c4a-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-4d37419f9b2ac94abae2e4ef3dc2cece-c92032e139003147-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "2a09442ae0209b9368256f2fbef66658", + "x-ms-client-request-id": "8f829a6a0180b3d539982a582d07950a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "b4e3a96d-8b76-4676-8b29-83d33e5ee307", + "apim-request-id": "642b3cc5-f8f0-46cc-b17d-dd5bae88b4ea", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:08 GMT", + "Date": "Thu, 17 Jun 2021 21:32:29 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "139", - "x-request-id": "b4e3a96d-8b76-4676-8b29-83d33e5ee307" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "153", + "X-Request-ID": "642b3cc5-f8f0-46cc-b17d-dd5bae88b4ea" }, "ResponseBody": [] }, { - "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/1a8c5037-2fad-4a8a-ae40-4fe5bff82f14", + "RequestUri": "https://js-metrics-advisor.cognitiveservices.azure.com/metricsadvisor/v1.0/dataFeeds/cdb4e854-2370-4b98-a85e-979946c0b9fb", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-aeed1a0844368644ba4d9bd54257b4f6-48e27d2bbe0eab42-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210609.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f416f9dee811a24a9b513487eb7362d5-51f83f59e6af124d-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", - "x-ms-client-request-id": "ce063a195afdfdbd9ab60296776a51bc", + "x-ms-client-request-id": "2a09442ae0209b9368256f2fbef66658", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "apim-request-id": "ff1cdff1-e000-4a12-b2d0-97a0fe01bd50", + "apim-request-id": "e0a16c85-1d39-44e7-bf06-eb13b26e2566", "Content-Length": "0", - "Date": "Wed, 09 Jun 2021 23:04:08 GMT", + "Date": "Thu, 17 Jun 2021 21:32:29 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "282", - "x-request-id": "ff1cdff1-e000-4a12-b2d0-97a0fe01bd50" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "303", + "X-Request-ID": "e0a16c85-1d39-44e7-bf06-eb13b26e2566" }, "ResponseBody": [] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False).json index 7c0f37bdbd486..ff8ea7d4ff13f 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False).json @@ -5,11 +5,14 @@ "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "127", + "Content-Length": "92", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-e29df3193d6ac341a7c4a66b36ccf2da-3c0c9fabe83e6e4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-f17f61c9565f1e46b7286ae145eee68d-c47eb335ccfbb547-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "38a83e304094ff90ceb319601b84e4de", "x-ms-return-client-request-id": "true" @@ -17,21 +20,18 @@ "RequestBody": { "startTime": "2020-10-01T00:00:00Z", "endTime": "2020-10-31T00:00:00Z", - "dimensionName": "city", - "dimensionFilter": { - "dimension": {} - } + "dimensionName": "city" }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "fb2213bd-4259-44bb-bf18-ef306cdd2f8b", + "apim-request-id": "4e95266e-3845-481f-9647-e49065fa5b4e", "Content-Length": "675", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:40 GMT", + "Date": "Thu, 17 Jun 2021 21:03:06 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "217", - "x-request-id": "fb2213bd-4259-44bb-bf18-ef306cdd2f8b" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "378", + "X-Request-ID": "4e95266e-3845-481f-9647-e49065fa5b4e" }, "ResponseBody": { "value": [ diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False)Async.json index 68fa5e2640141..648bc432ac5a8 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(False)Async.json @@ -5,11 +5,14 @@ "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "127", + "Content-Length": "92", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-2d6128328641d44194a6589fcf708c2f-9a1b673782f90449-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-0362dc9ef20a3a4aa0271471d1eccef7-4c5c9c1677814c44-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "1b3201153b6a0425b654c9297dbf44bb", "x-ms-return-client-request-id": "true" @@ -17,21 +20,18 @@ "RequestBody": { "startTime": "2020-10-01T00:00:00Z", "endTime": "2020-10-31T00:00:00Z", - "dimensionName": "city", - "dimensionFilter": { - "dimension": {} - } + "dimensionName": "city" }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "06e8665a-80fb-4e85-b2fc-4475b1d9fdb6", + "apim-request-id": "bd7e859d-99f1-41f9-aa90-673f47ac7fc7", "Content-Length": "675", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:54 GMT", + "Date": "Thu, 17 Jun 2021 21:03:24 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "223", - "x-request-id": "06e8665a-80fb-4e85-b2fc-4475b1d9fdb6" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5309", + "X-Request-ID": "bd7e859d-99f1-41f9-aa90-673f47ac7fc7" }, "ResponseBody": { "value": [ diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True).json index 0accd63546ce8..a924d2b71297a 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True).json @@ -6,31 +6,31 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "127", + "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-0626f5193d5b95418f1d1073a265b128-933a38ef3b2aa040-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-93bb10c4eb90dc4c9033781abdd90446-f3584955ee46c347-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-ms-client-request-id": "11b15dd584359f3249c01600a8fedb99", "x-ms-return-client-request-id": "true" }, "RequestBody": { "startTime": "2020-10-01T00:00:00Z", "endTime": "2020-10-31T00:00:00Z", - "dimensionName": "city", - "dimensionFilter": { - "dimension": {} - } + "dimensionName": "city" }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "ff52e5c5-fb01-466f-a1f8-900c1b3728ba", + "apim-request-id": "6e07cb99-d1c2-4b04-a697-78f33d78a1ce", "Content-Length": "675", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:40 GMT", + "Date": "Thu, 17 Jun 2021 21:03:06 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "206", - "x-request-id": "ff52e5c5-fb01-466f-a1f8-900c1b3728ba" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5407", + "X-Request-ID": "6e07cb99-d1c2-4b04-a697-78f33d78a1ce" }, "ResponseBody": { "value": [ diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True)Async.json index 7f1af8f2c8117..cea0bb7f6c505 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetAnomalyDimensionValuesWithMinimumSetup(True)Async.json @@ -6,31 +6,31 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "127", + "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-bd60ac834821dc489f6cb3a28316a0d8-6982e6977843134c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-009527b4c1a7ac4cbcb2bb19663cc8c7-7a96e3a9bd0e214d-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-ms-client-request-id": "e57fbf5659278075d2a85f55bd2c8a16", "x-ms-return-client-request-id": "true" }, "RequestBody": { "startTime": "2020-10-01T00:00:00Z", "endTime": "2020-10-31T00:00:00Z", - "dimensionName": "city", - "dimensionFilter": { - "dimension": {} - } + "dimensionName": "city" }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "9ad17387-3539-4d0d-bc19-f20b1fb83f7f", + "apim-request-id": "dfc8d3d8-b880-4ce9-b8af-0a53d88eb3ce", "Content-Length": "675", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:54 GMT", + "Date": "Thu, 17 Jun 2021 21:03:19 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "10505", - "x-request-id": "9ad17387-3539-4d0d-bc19-f20b1fb83f7f" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5325", + "X-Request-ID": "dfc8d3d8-b880-4ce9-b8af-0a53d88eb3ce" }, "ResponseBody": { "value": [ diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False).json index 03d083f53a26e..653322f7661f6 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False).json @@ -8,8 +8,11 @@ "Content-Length": "187", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-abc027728ffe4a45ae06d58b4733b322-bb5406f32dad6543-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-7f3fd9a1ce7e8f4588aa5736096ea934-c934febb5b490d43-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "6639609f282409f12f4e2e2a64e4dc59", "x-ms-return-client-request-id": "true" @@ -26,7 +29,7 @@ }, { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } } @@ -34,14 +37,14 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "aa0ff572-75d2-4d71-aba3-2e6204b3b9a9", - "Content-Length": "3089", + "apim-request-id": "bc7b5a69-e928-4e9e-b4bb-719f0dc463d5", + "Content-Length": "5757", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:41 GMT", + "Date": "Thu, 17 Jun 2021 21:32:40 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "260", - "x-request-id": "aa0ff572-75d2-4d71-aba3-2e6204b3b9a9" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "204", + "X-Request-ID": "bc7b5a69-e928-4e9e-b4bb-719f0dc463d5" }, "ResponseBody": { "value": [ @@ -181,72 +184,72 @@ 7 ], "expectedValueList": [ - 639841.41659923911, - 593988.65694304474, + 639841.4165992391, + 593988.6569430447, 406904.42575976794, 468582.4306800373, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, - 464950.18477452273, - 644979.96202732914, - 642600.37326538528, - 628513.53523696074, + 464950.1847745227, + 644979.9620273291, + 642600.3732653853, + 628513.5352369607, 624318.847227793, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, - 584109.19142256991, - 535764.72356415493, + 587514.0332989306, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "lowerBoundaryList": [ - 639841.41659923911, + 639841.4165992391, 591698.8, 393672.8, 461016.4, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, 460825.6, - 644979.96202732914, + 644979.9620273291, 639784.2, - 628513.53523696074, + 628513.5352369607, 622654.2, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 423373.6, 595968.4, 601921.3158975268, 585573.4, - 584109.19142256991, - 535764.72356415493, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "upperBoundaryList": [ 646400.8, - 593988.65694304474, + 593988.6569430447, 406904.42575976794, 468582.4306800373, 671330.0, @@ -255,42 +258,259 @@ 652647.2, 602663.2, 405481.2, - 464950.18477452273, + 464950.1847745227, 648188.4, - 642600.37326538528, + 642600.3732653853, 629455.0, 624318.847227793, 575832.6, 376714.8, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, + 587514.0332989306, 591703.2, - 535764.72356415493, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ] }, { "series": { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [], - "isAnomalyList": [], - "periodList": [], - "expectedValueList": [], - "lowerBoundaryList": [], - "upperBoundaryList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "isAnomalyList": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "periodList": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7 + ], + "expectedValueList": [ + 602657.8308902512, + 551644.1389537344, + 530415.6995441417, + 596868.8914712534, + 637170.4578975438, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 569679.069042395, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 581894.8624181054, + 553470.3970203849, + 488354.9538742486, + 454161.08138496167, + 510686.893693511, + 543755.0927649252, + 552162.1218538143, + 538586.9851290281, + 523384.3137928909, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ], + "lowerBoundaryList": [ + 584117.1999999998, + 551644.1389537344, + 530415.6995441417, + 583172.6, + 629951.2000000001, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 535988.3999999999, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 570096.2, + 547301.8, + 488354.9538742486, + 436706.0, + 497155.19999999995, + 543755.0927649252, + 541570.7999999999, + 538586.9851290281, + 521883.19999999995, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "upperBoundaryList": [ + 602657.8308902512, + 559628.6, + 541019.6, + 596868.8914712534, + 637170.4578975438, + 668722.0, + 637660.6388324968, + 646939.8, + 569679.069042395, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 581894.8624181054, + 553470.3970203849, + 492355.8, + 454161.08138496167, + 510686.893693511, + 545303.8, + 552162.1218538143, + 543422.4, + 523384.3137928909, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False)Async.json index 675ed31f5fb2a..1ef0a558319fa 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(False)Async.json @@ -8,8 +8,11 @@ "Content-Length": "187", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-580f124250d3a7409e4711a0a6d6e008-690952a5b0fc3744-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-cac8a2cc4926034da35f534f467387c1-0688d8ddacbbfa4f-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "9e05a31f518359a72525d25d66ac3b56", "x-ms-return-client-request-id": "true" @@ -26,7 +29,7 @@ }, { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } } @@ -34,14 +37,14 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "82fe937b-7687-464d-bafe-4ad60d6e3710", - "Content-Length": "3089", + "apim-request-id": "2cd6768c-ff19-4c05-9038-0c962cae7ad5", + "Content-Length": "5757", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:28:00 GMT", + "Date": "Thu, 17 Jun 2021 21:32:45 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "298", - "x-request-id": "82fe937b-7687-464d-bafe-4ad60d6e3710" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "212", + "X-Request-ID": "2cd6768c-ff19-4c05-9038-0c962cae7ad5" }, "ResponseBody": { "value": [ @@ -181,72 +184,72 @@ 7 ], "expectedValueList": [ - 639841.41659923911, - 593988.65694304474, + 639841.4165992391, + 593988.6569430447, 406904.42575976794, 468582.4306800373, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, - 464950.18477452273, - 644979.96202732914, - 642600.37326538528, - 628513.53523696074, + 464950.1847745227, + 644979.9620273291, + 642600.3732653853, + 628513.5352369607, 624318.847227793, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, - 584109.19142256991, - 535764.72356415493, + 587514.0332989306, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "lowerBoundaryList": [ - 639841.41659923911, + 639841.4165992391, 591698.8, 393672.8, 461016.4, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, 460825.6, - 644979.96202732914, + 644979.9620273291, 639784.2, - 628513.53523696074, + 628513.5352369607, 622654.2, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 423373.6, 595968.4, 601921.3158975268, 585573.4, - 584109.19142256991, - 535764.72356415493, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "upperBoundaryList": [ 646400.8, - 593988.65694304474, + 593988.6569430447, 406904.42575976794, 468582.4306800373, 671330.0, @@ -255,42 +258,259 @@ 652647.2, 602663.2, 405481.2, - 464950.18477452273, + 464950.1847745227, 648188.4, - 642600.37326538528, + 642600.3732653853, 629455.0, 624318.847227793, 575832.6, 376714.8, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, + 587514.0332989306, 591703.2, - 535764.72356415493, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ] }, { "series": { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [], - "isAnomalyList": [], - "periodList": [], - "expectedValueList": [], - "lowerBoundaryList": [], - "upperBoundaryList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "isAnomalyList": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "periodList": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7 + ], + "expectedValueList": [ + 602657.8308902512, + 551644.1389537344, + 530415.6995441417, + 596868.8914712534, + 637170.4578975438, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 569679.069042395, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 581894.8624181054, + 553470.3970203849, + 488354.9538742486, + 454161.08138496167, + 510686.893693511, + 543755.0927649252, + 552162.1218538143, + 538586.9851290281, + 523384.3137928909, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ], + "lowerBoundaryList": [ + 584117.1999999998, + 551644.1389537344, + 530415.6995441417, + 583172.6, + 629951.2000000001, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 535988.3999999999, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 570096.2, + 547301.8, + 488354.9538742486, + 436706.0, + 497155.19999999995, + 543755.0927649252, + 541570.7999999999, + 538586.9851290281, + 521883.19999999995, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "upperBoundaryList": [ + 602657.8308902512, + 559628.6, + 541019.6, + 596868.8914712534, + 637170.4578975438, + 668722.0, + 637660.6388324968, + 646939.8, + 569679.069042395, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 581894.8624181054, + 553470.3970203849, + 492355.8, + 454161.08138496167, + 510686.893693511, + 545303.8, + 552162.1218538143, + 543422.4, + 523384.3137928909, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True).json index 26d16718b875b..f5427fa5ac729 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True).json @@ -8,8 +8,11 @@ "Authorization": "Sanitized", "Content-Length": "187", "Content-Type": "application/json", - "traceparent": "00-514735ecd0b15b4cbe89638d1e5edea8-5e156c07b9f1184c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-b14c37f545f07942b4cf54655888dcb7-e8bd9b611b9cdb4c-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-ms-client-request-id": "c51c541ad7435173bdf03a9224a7adfb", "x-ms-return-client-request-id": "true" }, @@ -25,7 +28,7 @@ }, { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } } @@ -33,14 +36,14 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "64ea5e4c-e148-434b-82e7-b6fb1f59c301", - "Content-Length": "3089", + "apim-request-id": "68b25bfe-6d00-4da3-9e45-66e831bf481b", + "Content-Length": "5757", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:41 GMT", + "Date": "Thu, 17 Jun 2021 21:32:39 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "230", - "x-request-id": "64ea5e4c-e148-434b-82e7-b6fb1f59c301" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "549", + "X-Request-ID": "68b25bfe-6d00-4da3-9e45-66e831bf481b" }, "ResponseBody": { "value": [ @@ -180,72 +183,72 @@ 7 ], "expectedValueList": [ - 639841.41659923911, - 593988.65694304474, + 639841.4165992391, + 593988.6569430447, 406904.42575976794, 468582.4306800373, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, - 464950.18477452273, - 644979.96202732914, - 642600.37326538528, - 628513.53523696074, + 464950.1847745227, + 644979.9620273291, + 642600.3732653853, + 628513.5352369607, 624318.847227793, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, - 584109.19142256991, - 535764.72356415493, + 587514.0332989306, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "lowerBoundaryList": [ - 639841.41659923911, + 639841.4165992391, 591698.8, 393672.8, 461016.4, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, 460825.6, - 644979.96202732914, + 644979.9620273291, 639784.2, - 628513.53523696074, + 628513.5352369607, 622654.2, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 423373.6, 595968.4, 601921.3158975268, 585573.4, - 584109.19142256991, - 535764.72356415493, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "upperBoundaryList": [ 646400.8, - 593988.65694304474, + 593988.6569430447, 406904.42575976794, 468582.4306800373, 671330.0, @@ -254,42 +257,259 @@ 652647.2, 602663.2, 405481.2, - 464950.18477452273, + 464950.1847745227, 648188.4, - 642600.37326538528, + 642600.3732653853, 629455.0, 624318.847227793, 575832.6, 376714.8, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, + 587514.0332989306, 591703.2, - 535764.72356415493, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ] }, { "series": { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [], - "isAnomalyList": [], - "periodList": [], - "expectedValueList": [], - "lowerBoundaryList": [], - "upperBoundaryList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "isAnomalyList": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "periodList": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7 + ], + "expectedValueList": [ + 602657.8308902512, + 551644.1389537344, + 530415.6995441417, + 596868.8914712534, + 637170.4578975438, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 569679.069042395, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 581894.8624181054, + 553470.3970203849, + 488354.9538742486, + 454161.08138496167, + 510686.893693511, + 543755.0927649252, + 552162.1218538143, + 538586.9851290281, + 523384.3137928909, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ], + "lowerBoundaryList": [ + 584117.1999999998, + 551644.1389537344, + 530415.6995441417, + 583172.6, + 629951.2000000001, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 535988.3999999999, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 570096.2, + 547301.8, + 488354.9538742486, + 436706.0, + 497155.19999999995, + 543755.0927649252, + 541570.7999999999, + 538586.9851290281, + 521883.19999999995, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "upperBoundaryList": [ + 602657.8308902512, + 559628.6, + 541019.6, + 596868.8914712534, + 637170.4578975438, + 668722.0, + 637660.6388324968, + 646939.8, + 569679.069042395, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 581894.8624181054, + 553470.3970203849, + 492355.8, + 454161.08138496167, + 510686.893693511, + 545303.8, + 552162.1218538143, + 543422.4, + 523384.3137928909, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True)Async.json index dc7db5e1d4384..7bbd10d63666d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/AnomalyDetectionLiveTests/GetMetricEnrichedSeriesData(True)Async.json @@ -8,8 +8,11 @@ "Authorization": "Sanitized", "Content-Length": "187", "Content-Type": "application/json", - "traceparent": "00-2df13cb62fd52648a85cdb9fb7413e29-97ee7719115b2e4b-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210604.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "traceparent": "00-4d318fd0ee0a2040b7cb6a72520952c6-8969265b0ef51e4b-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-ms-client-request-id": "7a6779bf5eef6b461d3ef94f4adb15fd", "x-ms-return-client-request-id": "true" }, @@ -25,7 +28,7 @@ }, { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } } @@ -33,14 +36,14 @@ }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "93ac72fb-a6ed-4d09-b6bb-e3e0a32e8fcd", - "Content-Length": "3089", + "apim-request-id": "6e75e818-612d-4617-9613-030c3337da97", + "Content-Length": "5757", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 04 Jun 2021 10:27:59 GMT", + "Date": "Thu, 17 Jun 2021 21:32:45 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "5218", - "x-request-id": "93ac72fb-a6ed-4d09-b6bb-e3e0a32e8fcd" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5193", + "X-Request-ID": "6e75e818-612d-4617-9613-030c3337da97" }, "ResponseBody": { "value": [ @@ -180,72 +183,72 @@ 7 ], "expectedValueList": [ - 639841.41659923911, - 593988.65694304474, + 639841.4165992391, + 593988.6569430447, 406904.42575976794, 468582.4306800373, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, - 464950.18477452273, - 644979.96202732914, - 642600.37326538528, - 628513.53523696074, + 464950.1847745227, + 644979.9620273291, + 642600.3732653853, + 628513.5352369607, 624318.847227793, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, - 584109.19142256991, - 535764.72356415493, + 587514.0332989306, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "lowerBoundaryList": [ - 639841.41659923911, + 639841.4165992391, 591698.8, 393672.8, 461016.4, - 651100.31689623953, - 653907.80749789369, - 649388.10475532978, - 650261.48521728278, - 598233.03672833683, + 651100.3168962395, + 653907.8074978937, + 649388.1047553298, + 650261.4852172828, + 598233.0367283368, 405034.32113478496, 460825.6, - 644979.96202732914, + 644979.9620273291, 639784.2, - 628513.53523696074, + 628513.5352369607, 622654.2, 567354.0504453046, - 368844.75571440952, + 368844.7557144095, 423373.6, 595968.4, 601921.3158975268, 585573.4, - 584109.19142256991, - 535764.72356415493, + 584109.1914225699, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ], "upperBoundaryList": [ 646400.8, - 593988.65694304474, + 593988.6569430447, 406904.42575976794, 468582.4306800373, 671330.0, @@ -254,42 +257,259 @@ 652647.2, 602663.2, 405481.2, - 464950.18477452273, + 464950.1847745227, 648188.4, - 642600.37326538528, + 642600.3732653853, 629455.0, 624318.847227793, 575832.6, 376714.8, 425882.59950280725, - 605028.02480125893, + 605028.0248012589, 601921.3158975268, - 587514.03329893062, + 587514.0332989306, 591703.2, - 535764.72356415493, + 535764.7235641549, 345875.75775733317, - 411264.18596229109, - 598760.19567730289, - 602399.09709896054, - 594737.42482575425, - 596967.90257180436, - 548623.43471338938 + 411264.1859622911, + 598760.1956773029, + 602399.0970989605, + 594737.4248257542, + 596967.9025718044, + 548623.4347133894 ] }, { "series": { "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [], - "isAnomalyList": [], - "periodList": [], - "expectedValueList": [], - "lowerBoundaryList": [], - "upperBoundaryList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "isAnomalyList": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "periodList": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7 + ], + "expectedValueList": [ + 602657.8308902512, + 551644.1389537344, + 530415.6995441417, + 596868.8914712534, + 637170.4578975438, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 569679.069042395, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 581894.8624181054, + 553470.3970203849, + 488354.9538742486, + 454161.08138496167, + 510686.893693511, + 543755.0927649252, + 552162.1218538143, + 538586.9851290281, + 523384.3137928909, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ], + "lowerBoundaryList": [ + 584117.1999999998, + 551644.1389537344, + 530415.6995441417, + 583172.6, + 629951.2000000001, + 651921.6195511791, + 637660.6388324968, + 623650.4580555705, + 535988.3999999999, + 533724.3081245769, + 584138.3749155285, + 613015.1460059321, + 609767.412643928, + 570096.2, + 547301.8, + 488354.9538742486, + 436706.0, + 497155.19999999995, + 543755.0927649252, + 541570.7999999999, + 538586.9851290281, + 521883.19999999995, + 469279.66844071157, + 440922.7134814431, + 496478.2455123718, + 505174.9689402076, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ], + "upperBoundaryList": [ + 602657.8308902512, + 559628.6, + 541019.6, + 596868.8914712534, + 637170.4578975438, + 668722.0, + 637660.6388324968, + 646939.8, + 569679.069042395, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 581894.8624181054, + 553470.3970203849, + 492355.8, + 454161.08138496167, + 510686.893693511, + 545303.8, + 552162.1218538143, + 543422.4, + 523384.3137928909, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 483931.3029597479, + 443748.2174140322, + 403013.21669641853, + 323241.3934268125 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False).json index e7d53ba026ebd..d545ab51a9b95 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False).json @@ -8,8 +8,11 @@ "Content-Length": "159", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-85d2fb98d41753439a1117d99c2b6a1b-794d76f74c73584c-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210119.1 (.NET Framework 4.8.4250.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-1e73a1a2e090d24783dbff9b1e93149b-beffd59f270ca24c-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "6f1df1ad7afdc47dcecbddd5b1c03695", "x-ms-return-client-request-id": "true" @@ -23,21 +26,21 @@ "category": "Handmade" }, { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } ] }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "9b0ce591-1bf0-42d2-a7a5-04bf32846180", - "Content-Length": "1258", + "apim-request-id": "1cd05353-d8a4-461b-af14-fb5a40448174", + "Content-Length": "2300", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 19 Jan 2021 17:43:04 GMT", + "Date": "Thu, 17 Jun 2021 21:32:57 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "391", - "x-request-id": "9b0ce591-1bf0-42d2-a7a5-04bf32846180" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "331", + "X-Request-ID": "1cd05353-d8a4-461b-af14-fb5a40448174" }, "ResponseBody": { "value": [ @@ -118,12 +121,74 @@ "id": { "metricId": "27e3015f-04fd-44ba-a20b-bc529a0aebae", "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False)Async.json index 5f0511f1a4763..f4ff6d174a4d0 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(False)Async.json @@ -8,8 +8,11 @@ "Content-Length": "159", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-be4c70a23355794face0ea3655e7a4d2-d98720f70e5bd947-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210119.1 (.NET Framework 4.8.4250.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-64a0f7a704169f46ac78d0a8ff15dfbd-29831aa7205d0d49-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-api-key": "Sanitized", "x-ms-client-request-id": "1421926a622abd44639d3c61e90a1ad3", "x-ms-return-client-request-id": "true" @@ -23,21 +26,21 @@ "category": "Handmade" }, { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } ] }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "46e1668c-19d9-4cb3-83ee-24eba09b4ee0", - "Content-Length": "1258", + "apim-request-id": "16054dd2-53bf-46b1-9a6f-ea9c226f0ea7", + "Content-Length": "2300", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 19 Jan 2021 17:43:10 GMT", + "Date": "Thu, 17 Jun 2021 21:33:04 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "390", - "x-request-id": "46e1668c-19d9-4cb3-83ee-24eba09b4ee0" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "412", + "X-Request-ID": "16054dd2-53bf-46b1-9a6f-ea9c226f0ea7" }, "ResponseBody": { "value": [ @@ -118,12 +121,74 @@ "id": { "metricId": "27e3015f-04fd-44ba-a20b-bc529a0aebae", "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True).json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True).json index e070c5483f598..0c0c945392462 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True).json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True).json @@ -8,8 +8,11 @@ "Authorization": "Sanitized", "Content-Length": "159", "Content-Type": "application/json", - "traceparent": "00-422362a6b2bf984281f5fa9d6117ec4c-2b39a485153c9a4e-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210119.1 (.NET Framework 4.8.4250.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-ec707fdda757f6489db553568526ea90-34dcbf59ee976b42-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-ms-client-request-id": "c092c1abcb86dade10a3ef6b324a5508", "x-ms-return-client-request-id": "true" }, @@ -22,21 +25,21 @@ "category": "Handmade" }, { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } ] }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "2696d0d8-fdd1-4000-80cd-b2401bbc26eb", - "Content-Length": "1258", + "apim-request-id": "6e20291b-8980-49e1-8ab8-52b96ecb6e37", + "Content-Length": "2300", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 19 Jan 2021 17:43:04 GMT", + "Date": "Thu, 17 Jun 2021 21:32:57 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "228", - "x-request-id": "2696d0d8-fdd1-4000-80cd-b2401bbc26eb" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "281", + "X-Request-ID": "6e20291b-8980-49e1-8ab8-52b96ecb6e37" }, "ResponseBody": { "value": [ @@ -117,12 +120,74 @@ "id": { "metricId": "27e3015f-04fd-44ba-a20b-bc529a0aebae", "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ] } ] } diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True)Async.json b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True)Async.json index e4f7da2434349..f643fd95a669d 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True)Async.json +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/tests/SessionRecords/TimeSeriesLiveTests/GetMetricSeriesData(True)Async.json @@ -8,8 +8,11 @@ "Authorization": "Sanitized", "Content-Length": "159", "Content-Type": "application/json", - "traceparent": "00-aa17a5e342a4b548b971315263c92df3-82074abfb81f7446-00", - "User-Agent": "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210119.1 (.NET Framework 4.8.4250.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-0bc15af8677e4943ac3f42805dbd7ae5-ae8c903b2142814b-00", + "User-Agent": [ + "azsdk-net-AI.MetricsAdvisor/1.0.0-alpha.20210617.1", + "(.NET 5.0.7; Microsoft Windows 10.0.19043)" + ], "x-ms-client-request-id": "a65057f0d9da44e71e533e682e30c49d", "x-ms-return-client-request-id": "true" }, @@ -22,21 +25,21 @@ "category": "Handmade" }, { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } ] }, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "6ce9732d-c3b7-4f53-913b-3ff8fa6f60aa", - "Content-Length": "1258", + "apim-request-id": "43159311-a09c-4ea8-b55b-9a39a7215958", + "Content-Length": "2300", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 19 Jan 2021 17:43:09 GMT", + "Date": "Thu, 17 Jun 2021 21:33:03 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "222", - "x-request-id": "6ce9732d-c3b7-4f53-913b-3ff8fa6f60aa" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5301", + "X-Request-ID": "43159311-a09c-4ea8-b55b-9a39a7215958" }, "ResponseBody": { "value": [ @@ -117,12 +120,74 @@ "id": { "metricId": "27e3015f-04fd-44ba-a20b-bc529a0aebae", "dimension": { - "city": "Koltaka", + "city": "Kolkata", "category": "__SUM__" } }, - "timestampList": [], - "valueList": [] + "timestampList": [ + "2020-10-01T00:00:00Z", + "2020-10-02T00:00:00Z", + "2020-10-03T00:00:00Z", + "2020-10-04T00:00:00Z", + "2020-10-05T00:00:00Z", + "2020-10-06T00:00:00Z", + "2020-10-07T00:00:00Z", + "2020-10-08T00:00:00Z", + "2020-10-09T00:00:00Z", + "2020-10-10T00:00:00Z", + "2020-10-11T00:00:00Z", + "2020-10-12T00:00:00Z", + "2020-10-13T00:00:00Z", + "2020-10-14T00:00:00Z", + "2020-10-15T00:00:00Z", + "2020-10-16T00:00:00Z", + "2020-10-17T00:00:00Z", + "2020-10-18T00:00:00Z", + "2020-10-19T00:00:00Z", + "2020-10-20T00:00:00Z", + "2020-10-21T00:00:00Z", + "2020-10-22T00:00:00Z", + "2020-10-23T00:00:00Z", + "2020-10-24T00:00:00Z", + "2020-10-25T00:00:00Z", + "2020-10-26T00:00:00Z", + "2020-10-27T00:00:00Z", + "2020-10-28T00:00:00Z", + "2020-10-29T00:00:00Z", + "2020-10-30T00:00:00Z" + ], + "valueList": [ + 584117.1999999998, + 559628.6, + 541019.6, + 583172.6, + 629951.2000000001, + 668722.0, + 691216.2, + 646939.8, + 535988.3999999999, + 537591.6, + 587734.8000000002, + 622846.8, + 632489.2, + 570096.2, + 547301.8, + 492355.8, + 436706.0, + 497155.19999999995, + 545303.8, + 541570.7999999999, + 543422.4, + 521883.19999999995, + 485241.0, + 452760.8000000001, + 502012.8, + 516694.2, + 375593.19999999995, + 369414.4, + 350648.8, + 306626.6 + ] } ] }