From 59c63f05b5be428216964555f921a9e55bb08ee6 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 4 May 2021 12:14:49 -0700 Subject: [PATCH 1/5] Add QueryTimeSpan type --- .../src/Azure.Monitor.Query.csproj | 1 + .../Azure.Monitor.Query/src/LogsClient.cs | 16 +- .../src/MetricQueryOptions.cs | 18 +- .../Azure.Monitor.Query/src/MetricsClient.cs | 32 +--- .../src/Models/LogsBatchQuery.cs | 2 +- .../Azure.Monitor.Query/src/QueryTimeSpan.cs | 149 +++++++++++++++ .../tests/LogsClientSamples.cs | 19 +- .../tests/LogsQueryClientClientLiveTests.cs | 80 ++++---- .../tests/LogsQueryClientClientTests.cs | 2 +- .../Azure.Monitor.Query/tests/LogsTestData.cs | 3 +- .../tests/MetricsQueryClientLiveTests.cs | 24 +-- .../tests/MetricsTestData.cs | 3 +- .../tests/QueryTimeSpanTests.cs | 38 ++++ .../CanQuery.json | 29 ++- .../CanQueryAllSupportedTypes.json | 23 ++- .../CanQueryAllSupportedTypesAsync.json | 24 ++- .../CanQueryAllSupportedTypesIntoModel.json | 23 ++- ...nQueryAllSupportedTypesIntoModelAsync.json | 24 ++- ...eryAllSupportedTypesIntoModelNullable.json | 24 ++- ...lSupportedTypesIntoModelNullableAsync.json | 24 ++- ...nQueryAllSupportedTypesIntoModelNulls.json | 23 ++- ...yAllSupportedTypesIntoModelNullsAsync.json | 24 ++- .../CanQueryAsync.json | 30 ++- .../CanQueryBatch.json | 39 ++-- .../CanQueryBatchAsync.json | 31 ++-- .../CanQueryBatchWithTimespan.json | 42 +++-- .../CanQueryBatchWithTimespanAsync.json | 50 ++--- .../CanQueryIntoClass.json | 47 +++-- .../CanQueryIntoClassAsync.json | 48 +++-- .../CanQueryIntoDictionary.json | 23 ++- .../CanQueryIntoDictionaryAsync.json | 24 ++- .../CanQueryIntoIDictionary.json | 24 ++- .../CanQueryIntoIDictionaryAsync.json | 24 ++- .../CanQueryIntoNullablePrimitive.json | 156 ++++++++-------- .../CanQueryIntoNullablePrimitiveAsync.json | 156 ++++++++-------- .../CanQueryIntoNullablePrimitiveNull.json | 24 ++- ...anQueryIntoNullablePrimitiveNullAsync.json | 24 ++- .../CanQueryIntoPrimitive.json | 175 +++++++++--------- .../CanQueryIntoPrimitiveAsync.json | 175 +++++++++--------- .../CanQueryIntoPrimitiveInt.json | 24 ++- .../CanQueryIntoPrimitiveIntAsync.json | 24 ++- .../CanQueryIntoPrimitiveString.json | 23 ++- .../CanQueryIntoPrimitiveStringAsync.json | 24 ++- .../CanQueryWithStatistics(False).json | 44 ++--- .../CanQueryWithStatistics(False)Async.json | 45 ++--- .../CanQueryWithStatistics(True).json | 60 +++--- .../CanQueryWithStatistics(True)Async.json | 60 +++--- .../CanQueryWithStatisticsBatch(False).json | 48 +++-- ...nQueryWithStatisticsBatch(False)Async.json | 48 +++-- .../CanQueryWithStatisticsBatch(True).json | 57 +++--- ...anQueryWithStatisticsBatch(True)Async.json | 61 +++--- .../CanQueryWithTimespan.json | 26 ++- .../CanQueryWithTimespanAsync.json | 25 ++- .../CanSetServiceTimeout.json | 45 ++--- .../CanSetServiceTimeoutAsync.json | 45 ++--- ...ThrowsExceptionWhenBatchQueryNotFound.json | 46 ++--- ...sExceptionWhenBatchQueryNotFoundAsync.json | 46 ++--- .../ThrowsExceptionWhenQueryFails.json | 21 ++- .../ThrowsExceptionWhenQueryFailsAsync.json | 21 ++- .../ThrowsExceptionWhenQueryFailsBatch.json | 21 ++- ...rowsExceptionWhenQueryFailsBatchAsync.json | 21 ++- .../CanListMetrics.json | 17 +- .../CanListMetricsAsync.json | 17 +- .../CanListNamespacesMetrics.json | 19 +- .../CanListNamespacesMetricsAsync.json | 19 +- .../CanQueryMetrics.json | 27 ++- .../CanQueryMetricsAllAggregations.json | 51 +++-- .../CanQueryMetricsAllAggregationsAsync.json | 51 +++-- .../CanQueryMetricsAsync.json | 27 ++- .../CanQueryMetricsDurationEnd.json | 51 +++-- .../CanQueryMetricsDurationEndAsync.json | 51 +++-- .../CanQueryMetricsFilter.json | 51 +++-- .../CanQueryMetricsFilterAsync.json | 51 +++-- .../CanQueryMetricsFilterTop.json | 51 +++-- .../CanQueryMetricsFilterTopAsync.json | 55 +++--- .../CanQueryMetricsNoTimespan.json | 170 +++++++++-------- .../CanQueryMetricsNoTimespanAsync.json | 170 +++++++++-------- .../CanQueryMetricsStartDuration.json | 51 +++-- .../CanQueryMetricsStartDurationAsync.json | 51 +++-- .../CanQueryMetricsStartEnd.json | 51 +++-- .../CanQueryMetricsStartEndAsync.json | 51 +++-- .../CanQueryMetricsStartEndInterval.json | 27 ++- .../CanQueryMetricsStartEndIntervalAsync.json | 27 ++- 83 files changed, 1888 insertions(+), 1780 deletions(-) create mode 100644 sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs diff --git a/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj b/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj index 19eeaf4d87a01..ca9a7e79dd650 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj +++ b/sdk/monitor/Azure.Monitor.Query/src/Azure.Monitor.Query.csproj @@ -26,6 +26,7 @@ + diff --git a/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs b/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs index d4249b232e0e4..e9189c567e122 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs @@ -63,7 +63,7 @@ protected LogsClient() /// The to configure the query. /// The to use. /// Query results mapped to a type . - public virtual Response> Query(string workspaceId, string query, TimeSpan? timeSpan = null, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual Response> Query(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { Response response = Query(workspaceId, query, timeSpan, options, cancellationToken); @@ -79,7 +79,7 @@ public virtual Response> Query(string workspaceId, string qu /// The to configure the query. /// The to use. /// Query results mapped to a type . - public virtual async Task>> QueryAsync(string workspaceId, string query, TimeSpan? timeSpan = null, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task>> QueryAsync(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { Response response = await QueryAsync(workspaceId, query, timeSpan, options, cancellationToken).ConfigureAwait(false); @@ -95,7 +95,7 @@ public virtual async Task>> QueryAsync(string works /// The to configure the query. /// The to use. /// The containing the query results. - public virtual Response Query(string workspaceId, string query, TimeSpan? timeSpan = null, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual Response Query(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(LogsClient)}.{nameof(Query)}"); scope.Start(); @@ -119,7 +119,7 @@ public virtual Response Query(string workspaceId, string query, /// The to configure the query. /// The to use. /// The with the query results. - public virtual async Task> QueryAsync(string workspaceId, string query, TimeSpan? timeSpan = null, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task> QueryAsync(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(LogsClient)}.{nameof(Query)}"); scope.Start(); @@ -143,12 +143,12 @@ public virtual LogsBatchQuery CreateBatchQuery() return new LogsBatchQuery(_clientDiagnostics, _queryClient, _rowBinder); } - internal static QueryBody CreateQueryBody(string query, TimeSpan? timeSpan, LogsQueryOptions options, out string prefer) + internal static QueryBody CreateQueryBody(string query, QueryTimeSpan timeSpan, LogsQueryOptions options, out string prefer) { var queryBody = new QueryBody(query); - if (timeSpan != null) + if (timeSpan != QueryTimeSpan.MaxValue) { - queryBody.Timespan = TypeFormatters.ToString(timeSpan.Value, "P"); + queryBody.Timespan = timeSpan.ToString(); } prefer = null; @@ -166,7 +166,7 @@ internal static QueryBody CreateQueryBody(string query, TimeSpan? timeSpan, Logs return queryBody; } - private async Task> ExecuteAsync(string workspaceId, string query, TimeSpan? timeSpan, LogsQueryOptions options, bool async, CancellationToken cancellationToken = default) + private async Task> ExecuteAsync(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options, bool async, CancellationToken cancellationToken = default) { if (workspaceId == null) { diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs index edc3de546eca5..a963cd2a94974 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs @@ -13,23 +13,9 @@ namespace Azure.Monitor.Query public class MetricQueryOptions { /// - /// Gets ot sets the start of the time range for the query. - /// This value has to be used in combination with the or . + /// Gets or sets the time span over which the metric would be queried. /// - public DateTimeOffset? StartTime { get; set; } - - /// - /// Gets ot sets the end of the time range for the query. - /// This value has to be used in combination with the or . - /// - public DateTimeOffset? EndTime { get; set; } - - /// - /// Gets ot sets the duration that of the time range for the query. - /// This value can be set on it's own or in combination with the or - /// but not both. - /// - public TimeSpan? Duration { get; set; } + public QueryTimeSpan? TimeSpan { get; set; } /// /// Gets ot sets the interval to sample metrics at. diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs index c8a71ac3ed3dd..9bfad583e86df 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsClient.cs @@ -71,7 +71,7 @@ public virtual Response Query(string resource, IEnumerable> QueryAsync(string resourc try { return await _metricsRestClient.ListAsync(resource, - timespan: GetTimespan(options), + timespan: options?.TimeSpan?.ToString(), interval: options?.Interval, filter: options?.Filter, top: options?.Top, @@ -220,34 +220,6 @@ public virtual async Task>> GetMetricNam } } - private static string GetTimespan(MetricQueryOptions options) - { - var startTime = options?.StartTime != null ? TypeFormatters.ToString(options.StartTime.Value, "o") : null; - var endTime = options?.EndTime != null ? TypeFormatters.ToString(options.EndTime.Value, "o") : null; - var duration = options?.Duration != null ? TypeFormatters.ToString(options.Duration.Value, "P") : null; - - switch (startTime, endTime, duration) - { - case (null, null, string): - return duration; - case (string, string, null): - return $"{startTime}/{endTime}"; - case (string, null, string): - return $"{startTime}/{duration}"; - case (null, string, string): - return $"{duration}/{endTime}"; - case (null, null, null): - return null; - default: - throw new ArgumentException( - $"The following combinations of {nameof(MetricQueryOptions.Duration)}, {nameof(MetricQueryOptions.StartTime)}, {nameof(MetricQueryOptions.EndTime)} are allowed: " + Environment.NewLine + - $" {nameof(MetricQueryOptions.Duration)}, " + Environment.NewLine + - $" {nameof(MetricQueryOptions.StartTime)} + {nameof(MetricQueryOptions.Duration)}" + Environment.NewLine + - $" {nameof(MetricQueryOptions.Duration)} + {nameof(MetricQueryOptions.EndTime)}" + Environment.NewLine + - $" {nameof(MetricQueryOptions.StartTime)} + {nameof(MetricQueryOptions.EndTime)}"); - } - } - private static string GetAggregation(MetricQueryOptions options) { if (options?.Aggregations == null || diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs index 0150373c97c76..10ec19a472688 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs @@ -44,7 +44,7 @@ protected LogsBatchQuery() /// The timespan over which to query data. /// The to configure the query. /// The query identifier that has to be passed into to get the result. - public virtual string AddQuery(string workspaceId, string query, TimeSpan? timeSpan = null, LogsQueryOptions options = null) + public virtual string AddQuery(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null) { var id = _counter.ToString("G", CultureInfo.InvariantCulture); _counter++; diff --git a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs b/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs new file mode 100644 index 0000000000000..919e893710c03 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; + +namespace Azure.Monitor.Query +{ + /// + /// Represents a span of time over which the query would be executed. + /// + public readonly struct QueryTimeSpan : IEquatable + { + /// + /// Represents the maximum . + /// + public static QueryTimeSpan MaxValue => new QueryTimeSpan(TimeSpan.MaxValue); + + /// + /// Gets the duration of the interval. + /// + public TimeSpan Duration { get; } + + /// + /// Gets the start time of the interval. + /// + public DateTimeOffset? StartTime { get; } + + /// + /// Gets the end time of the interval. + /// + public DateTimeOffset? EndTime { get; } + + /// + /// Initializes an instance of using a duration value. + /// + /// The duration of the interval. + public QueryTimeSpan(TimeSpan duration) + { + Duration = duration; + StartTime = null; + EndTime = null; + } + + /// + /// Initializes an instance of using a start time and a duration value. + /// + /// The start of the interval. + /// The duration of the interval. + public QueryTimeSpan(DateTimeOffset startTime, TimeSpan duration) + { + Duration = duration; + StartTime = startTime; + EndTime = null; + } + + /// + /// Initializes an instance of using a duration and an end time. + /// + /// The duration of the interval. + /// The end of the interval. + public QueryTimeSpan(TimeSpan duration, DateTimeOffset endTime) + { + Duration = duration; + StartTime = null; + EndTime = endTime; + } + + /// + /// Initializes an instance of using a start time and an end time. + /// + /// The start of the interval. + /// The end of the interval. + public QueryTimeSpan(DateTimeOffset startTime, DateTimeOffset endTime) + { + Duration = endTime - startTime; + StartTime = startTime; + EndTime = endTime; + } + + /// + /// Converts a to a . + /// + /// The value to convert. + public static implicit operator QueryTimeSpan(TimeSpan timeSpan) => new QueryTimeSpan(timeSpan); + + /// + public override string ToString() + { + var startTime = StartTime != null ? TypeFormatters.ToString(StartTime.Value, "o") : null; + var endTime = EndTime != null ? TypeFormatters.ToString(EndTime.Value, "o") : null; + var duration = TypeFormatters.ToString(Duration, "P"); + + switch (startTime, endTime, duration) + { + case (string, string, _): + return $"{startTime}/{endTime}"; + case (string, null, string): + return $"{startTime}/{duration}"; + case (null, string, string): + return $"{duration}/{endTime}"; + default: + return duration; + } + } + + /// + public bool Equals(QueryTimeSpan other) + { + return Duration.Equals(other.Duration) && + Nullable.Equals(StartTime, other.StartTime) && + Nullable.Equals(EndTime, other.EndTime); + } + + /// + public override bool Equals(object obj) + { + return obj is QueryTimeSpan other && Equals(other); + } + + /// + /// Determines if two values are the same. + /// + /// The first to compare. + /// The second to compare. + /// True if and are the same; otherwise, false. + public static bool operator ==(QueryTimeSpan left, QueryTimeSpan right) + { + return left.Equals(right); + } + + /// + /// Determines if two values are different. + /// + /// The first to compare. + /// The second to compare. + /// True if and are different; otherwise, false. + public static bool operator !=(QueryTimeSpan left, QueryTimeSpan right) + { + return !left.Equals(right); + } + + /// + public override int GetHashCode() + { + return HashCodeBuilder.Combine(StartTime, EndTime, Duration); + } + } +} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsClientSamples.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsClientSamples.cs index 99e007b70c0be..57c6233e946ff 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsClientSamples.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsClientSamples.cs @@ -6,8 +6,6 @@ using System.Linq; using System.Threading.Tasks; using Azure.Core.TestFramework; -using Azure.Identity; -using Azure.Monitor.Query; using Azure.Monitor.Query.Models; using NUnit.Framework; @@ -23,7 +21,7 @@ public async Task QueryLogsAsTable() LogsClient client = new LogsClient(new DefaultAzureCredential()); /*@@*/string workspaceId = TestEnvironment.WorkspaceId; //@@string workspaceId = ""; - Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated"); + Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated", TimeSpan.FromDays(1)); LogsQueryResultTable table = response.Value.PrimaryTable; @@ -46,7 +44,7 @@ public async Task QueryLogsAsTablePrintAll() #else string workspaceId = TestEnvironment.WorkspaceId; #endif - Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated"); + Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated", TimeSpan.FromDays(1)); LogsQueryResultTable table = response.Value.PrimaryTable; @@ -85,7 +83,8 @@ public async Task QueryLogsAsPrimitive() // Query TOP 10 resource groups by event count Response> response = await client.QueryAsync(workspaceId, - "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup"); + "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup", + TimeSpan.FromDays(1)); foreach (var resourceGroup in response.Value) { @@ -109,7 +108,8 @@ public async Task QueryLogsAsModels() // Query TOP 10 resource groups by event count Response> response = await client.QueryAsync(workspaceId, - "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count"); + "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", + TimeSpan.FromDays(1)); foreach (var logEntryModel in response.Value) { @@ -134,8 +134,8 @@ public async Task BatchQuery() // Query TOP 10 resource groups by event count // And total event count LogsBatchQuery batch = client.CreateBatchQuery(); - string countQueryId = batch.AddQuery(workspaceId, "AzureActivity | count"); - string topQueryId = batch.AddQuery(workspaceId, "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count"); + string countQueryId = batch.AddQuery(workspaceId, "AzureActivity | count", TimeSpan.FromDays(1)); + string topQueryId = batch.AddQuery(workspaceId, "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", TimeSpan.FromDays(1)); Response response = await batch.SubmitAsync(); @@ -166,6 +166,7 @@ public async Task QueryLogsWithTimeout() // Query TOP 10 resource groups by event count Response> response = await client.QueryAsync(workspaceId, "AzureActivity | summarize count()", + TimeSpan.FromDays(1), options: new LogsQueryOptions() { Timeout = TimeSpan.FromMinutes(10) @@ -191,7 +192,7 @@ public async Task BadRequest() LogsClient client = new LogsClient(new DefaultAzureCredential()); try { - await client.QueryAsync(workspaceId, "My Not So Valid Query"); + await client.QueryAsync(workspaceId, "My Not So Valid Query", TimeSpan.FromDays(1)); } catch (Exception e) { diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs index 2a574ca0e973c..ca75653c71f26 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs @@ -43,7 +43,8 @@ public async Task CanQuery() var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} |" + $"project {LogsTestData.StringColumnName}, {LogsTestData.IntColumnName}, {LogsTestData.BoolColumnName}, {LogsTestData.FloatColumnName} |" + - $"order by {LogsTestData.StringColumnName} asc"); + $"order by {LogsTestData.StringColumnName} asc", + _logsTestData.DataTimeSpan); var resultTable = results.Value.Tables.Single(); CollectionAssert.IsNotEmpty(resultTable.Columns); @@ -67,7 +68,8 @@ public async Task CanQueryIntoPrimitiveString() var client = CreateClient(); var results = await client.QueryAsync(TestEnvironment.WorkspaceId, - $"{_logsTestData.TableAName} | project {LogsTestData.StringColumnName} | order by {LogsTestData.StringColumnName} asc"); + $"{_logsTestData.TableAName} | project {LogsTestData.StringColumnName} | order by {LogsTestData.StringColumnName} asc", + _logsTestData.DataTimeSpan); CollectionAssert.AreEqual(new[] {"a", "b", "c"}, results.Value); } @@ -77,7 +79,8 @@ public async Task CanQueryIntoPrimitiveInt() { var client = CreateClient(); - var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | count"); + var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | count", + _logsTestData.DataTimeSpan); Assert.AreEqual(_logsTestData.TableA.Count, results.Value[0]); } @@ -90,7 +93,8 @@ public async Task CanQueryIntoClass() var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} |" + $"project-rename Name = {LogsTestData.StringColumnName}, Age = {LogsTestData.IntColumnName} |" + - $"order by Name asc"); + $"order by Name asc", + _logsTestData.DataTimeSpan); CollectionAssert.AreEqual(new[] { @@ -109,7 +113,8 @@ public async Task CanQueryIntoDictionary() $"{_logsTestData.TableAName} |" + $"project-rename Name = {LogsTestData.StringColumnName}, Age = {LogsTestData.IntColumnName} |" + $"project Name, Age |" + - $"order by Name asc"); + $"order by Name asc", + _logsTestData.DataTimeSpan); CollectionAssert.AreEqual(new[] { @@ -128,7 +133,8 @@ public async Task CanQueryIntoIDictionary() $"{_logsTestData.TableAName} |" + $"project-rename Name = {LogsTestData.StringColumnName}, Age = {LogsTestData.IntColumnName} |" + $"project Name, Age |" + - $"order by Name asc"); + $"order by Name asc", + _logsTestData.DataTimeSpan); CollectionAssert.AreEqual(new[] { @@ -143,8 +149,8 @@ public async Task CanQueryBatch() { var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat"); - string id2 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat"); + string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat", _logsTestData.DataTimeSpan); + string id2 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat", _logsTestData.DataTimeSpan); Response response = await batch.SubmitAsync(); var result1 = response.Value.GetResult(id1); @@ -172,7 +178,7 @@ public async Task CanQueryAllSupportedTypes() "10s," + "decimal(0.10101)," + "bool(null)" + - "]"); + "]", _logsTestData.DataTimeSpan); LogsQueryResultRow row = results.Value.PrimaryTable.Rows[0]; @@ -225,7 +231,7 @@ public async Task CanQueryAllSupportedTypesIntoModel() "'string value'," + "10s," + "decimal(0.10101)" + - "]"); + "]", _logsTestData.DataTimeSpan); TestModelForTypes row = results.Value[0]; @@ -257,7 +263,7 @@ public async Task CanQueryAllSupportedTypesIntoModelNullable() "'string value'," + "10s," + "decimal(0.10101)" + - "]"); + "]", _logsTestData.DataTimeSpan); TestModelForTypesNullable row = results.Value[0]; @@ -289,7 +295,7 @@ public async Task CanQueryAllSupportedTypesIntoModelNulls() "'I cant be null'," + "timespan(null)," + "decimal(null)," + - "]"); + "]", _logsTestData.DataTimeSpan); TestModelForTypesNullable row = results.Value[0]; @@ -309,15 +315,15 @@ public async Task CanQueryIntoPrimitive() { var client = CreateClient(); - Assert.AreEqual(DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]")).Value[0]); - Assert.AreEqual(false, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ false ]")).Value[0]); - Assert.AreEqual(Guid.Parse("74be27de-1e4e-49d9-b579-fe0b331d3642"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]")).Value[0]); - Assert.AreEqual(12345, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ 12345 ]")).Value[0]); - Assert.AreEqual(1234567890123, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ 1234567890123 ]")).Value[0]); - Assert.AreEqual(12345.6789d, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ 12345.6789 ]")).Value[0]); - Assert.AreEqual("string value", (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (String: string) [ \"string value\" ]")).Value[0]); - Assert.AreEqual(TimeSpan.FromSeconds(10), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ 10s ]")).Value[0]); - Assert.AreEqual(0.10101m, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(0.10101) ]")).Value[0]); + Assert.AreEqual(DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(false, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ false ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(Guid.Parse("74be27de-1e4e-49d9-b579-fe0b331d3642"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(12345, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ 12345 ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(1234567890123, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ 1234567890123 ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(12345.6789d, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ 12345.6789 ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual("string value", (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (String: string) [ \"string value\" ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(TimeSpan.FromSeconds(10), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ 10s ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(0.10101m, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(0.10101) ]", _logsTestData.DataTimeSpan)).Value[0]); } [RecordedTest] @@ -325,14 +331,14 @@ public async Task CanQueryIntoNullablePrimitive() { var client = CreateClient(); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ bool(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ int(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ long(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ double(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ timespan(null) ]")).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(null) ]")).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ bool(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ int(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ long(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ double(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ timespan(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(null) ]", _logsTestData.DataTimeSpan)).Value[0]); } [RecordedTest] @@ -340,7 +346,7 @@ public async Task CanQueryIntoNullablePrimitiveNull() { var client = CreateClient(); - var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]"); + var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]", _logsTestData.DataTimeSpan); Assert.IsNull(results.Value[0]); } @@ -375,7 +381,7 @@ public async Task CanQueryBatchWithTimespan() var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.TimeGeneratedColumnName}"); + string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.TimeGeneratedColumnName}", _logsTestData.DataTimeSpan); string id2 = batch.AddQuery(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.TimeGeneratedColumnName}", timespan); Response response = await batch.SubmitAsync(); @@ -393,7 +399,7 @@ public async Task CanQueryBatchWithTimespan() public void ThrowsExceptionWhenQueryFails() { var client = CreateClient(); - var exception = Assert.ThrowsAsync(async () => await client.QueryAsync(TestEnvironment.WorkspaceId, "this won't work")); + var exception = Assert.ThrowsAsync(async () => await client.QueryAsync(TestEnvironment.WorkspaceId, "this won't work", _logsTestData.DataTimeSpan)); Assert.AreEqual("BadArgumentError", exception.ErrorCode); StringAssert.StartsWith("The request had some invalid properties", exception.Message); @@ -405,7 +411,7 @@ public async Task ThrowsExceptionWhenQueryFailsBatch() var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, "this won't work"); + var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, "this won't work", _logsTestData.DataTimeSpan); var batchResult = await batch.SubmitAsync(); var exception = Assert.Throws(() => batchResult.Value.GetResult(queryId)); @@ -420,7 +426,7 @@ public async Task ThrowsExceptionWhenBatchQueryNotFound() var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName); + batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan); var batchResult = await batch.SubmitAsync(); var exception = Assert.Throws(() => batchResult.Value.GetResult("12345")); @@ -436,7 +442,7 @@ public async Task CanQueryWithStatistics(bool include) { var client = CreateClient(); - var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, options: new LogsQueryOptions() + var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan, options: new LogsQueryOptions() { IncludeStatistics = include }); @@ -459,7 +465,7 @@ public async Task CanQueryWithStatisticsBatch(bool include) var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, options: new LogsQueryOptions() + var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan, options: new LogsQueryOptions() { IncludeStatistics = include }); @@ -481,7 +487,7 @@ public async Task CanSetServiceTimeout() { var client = CreateClient(); - var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, options: new LogsQueryOptions() + var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan, options: new LogsQueryOptions() { Timeout = TimeSpan.FromMinutes(10) }); diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientTests.cs index 85e98a1dff028..8c04b1b37721a 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientTests.cs @@ -28,7 +28,7 @@ public void CanSetServiceTimeout_Mocked() Transport = mockTransport }); - Assert.ThrowsAsync(() => client.QueryAsync("wid", "tid", options: new LogsQueryOptions() + Assert.ThrowsAsync(() => client.QueryAsync("wid", "tid", TimeSpan.FromDays(1), options: new LogsQueryOptions() { Timeout = TimeSpan.FromMinutes(10) })); diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs index 1005970e6d05d..877ccea50f8e8 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs @@ -39,6 +39,7 @@ public class LogsTestData private string TableANameSent => nameof(TableA) + DataVersion + "_" + RetentionWindowStart.DayOfYear; public string TableAName => TableANameSent + "_CL"; + public QueryTimeSpan DataTimeSpan => new QueryTimeSpan(RetentionWindowStart, TimeSpan.FromDays(7)); private readonly MonitorQueryClientTestEnvironment _testEnvironment; private static bool _initialized; @@ -113,7 +114,7 @@ private async Task QueryCount() var logsClient = new LogsClient(_testEnvironment.Credential); try { - var countResponse = await logsClient.QueryAsync(_testEnvironment.WorkspaceId, $"{TableAName} | count"); + var countResponse = await logsClient.QueryAsync(_testEnvironment.WorkspaceId, $"{TableAName} | count", DataTimeSpan); var count = countResponse.Value.Single(); return count; } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs index 122b22d0dfcaf..f2f221f5c5fae 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs @@ -55,8 +55,7 @@ public async Task CanQueryMetrics() new MetricQueryOptions() { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - Duration = duration + TimeSpan = new QueryTimeSpan(_testData.StartTime, duration) }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -76,8 +75,7 @@ public async Task CanQueryMetricsAllAggregations() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - EndTime = _testData.StartTime.Add(_testData.Duration), + TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.StartTime.Add(_testData.Duration)), Aggregations = { MetricAggregationType.Average, @@ -110,8 +108,7 @@ public async Task CanQueryMetricsStartEnd() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - EndTime = _testData.EndTime + TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -131,8 +128,7 @@ public async Task CanQueryMetricsStartDuration() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - Duration = _testData.Duration + TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.Duration) }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -152,8 +148,7 @@ public async Task CanQueryMetricsDurationEnd() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - EndTime = _testData.EndTime, - Duration = _testData.Duration + TimeSpan = new QueryTimeSpan(_testData.Duration, _testData.EndTime) }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -190,8 +185,7 @@ public async Task CanQueryMetricsStartEndInterval() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - EndTime = _testData.EndTime, + TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), Interval = TimeSpan.FromMinutes(5) }); @@ -212,8 +206,7 @@ public async Task CanQueryMetricsFilter() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - EndTime = _testData.EndTime, + TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), Filter = $"Name eq '{_testData.Name1}'", Aggregations = { @@ -236,8 +229,7 @@ public async Task CanQueryMetricsFilterTop() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - StartTime = _testData.StartTime, - EndTime = _testData.EndTime, + TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), Filter = $"Name eq '*'", Top = 1, Aggregations = diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs index 0dca559e46a2a..62e39df2e9dc5 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs @@ -85,8 +85,7 @@ private async Task MetricsPropagated(MetricsClient metricClient) var metrics = await metricClient.QueryAsync(_testEnvironment.MetricsResource, new[] {MetricName}, new MetricQueryOptions() { - StartTime = StartTime, - Duration = Duration, + TimeSpan = new QueryTimeSpan(StartTime, Duration), MetricNamespace = MetricNamespace, Interval = TimeSpan.FromMinutes(1), Aggregations = diff --git a/sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs new file mode 100644 index 0000000000000..c3a6dd363392f --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using NUnit.Framework; + +namespace Azure.Monitor.Query.Tests +{ + public class QueryTimeSpanTests + { + [Test] + public void ToStringDurationTests() + { + Assert.AreEqual("PT23M", new QueryTimeSpan(TimeSpan.FromMinutes(23)).ToString()); + } + + [Test] + public void ToStringDurationEndTests() + { + Assert.AreEqual("PT23M/2021-05-04T03:02:01.0000000Z", new QueryTimeSpan(TimeSpan.FromMinutes(23), new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero)).ToString()); + } + + [Test] + public void ToStringStartDurationTests() + { + Assert.AreEqual("2021-05-04T03:02:01.0000000Z/PT23M", new QueryTimeSpan(new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero), TimeSpan.FromMinutes(23)).ToString()); + } + + [Test] + public void ToStringStartEndTests() + { + Assert.AreEqual("2021-01-02T03:04:05.0000000Z/2021-05-04T03:02:01.0000000Z", + new QueryTimeSpan( + new DateTimeOffset(2021, 1, 2, 3, 4, 5, TimeSpan.Zero), + new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero)).ToString()); + } + } +} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQuery.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQuery.json index 699b47129c447..18370ff145811 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQuery.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQuery.json @@ -1,38 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "121", + "Content-Length": "167", "Content-Type": "application/json", - "traceparent": "00-dd114e07f028b14a9fc7a90533d82a65-d070a037ee567b4e-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-5de85b9bc751ce4ba651541b8f9b2ea9-a275707c20ee924d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "d36f33f97f3b8afbfd44a3fa76ab65e8", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project StringColumn_s, IntColumn_d, BoolColumn_b, FloatColumn_d |order by StringColumn_s asc" + "query": "TableA1_116_CL |project StringColumn_s, IntColumn_d, BoolColumn_b, FloatColumn_d |order by StringColumn_s asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "84", "Connection": "keep-alive", - "Content-Length": "265", + "Content-Length": "279", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:12 GMT", + "Date": "Tue, 04 May 2021 18:37:04 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-cv4fn", + "Via": "1.1 draft-oms-6c84644dc4-cl8rl", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -68,13 +67,13 @@ "b", 3, true, - 1.2 + 1.20000005 ], [ "c", 1, false, - 1.1 + 1.10000002 ] ] } @@ -83,8 +82,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:09.8221311-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:02.7017507-07:00", "RandomSeed": "1577816746", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypes.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypes.json index 60d26bf45cd3f..e3a05d2650cce 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypes.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypes.json @@ -1,38 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "342", + "Content-Length": "388", "Content-Type": "application/json", - "traceparent": "00-405f122c3f07744e98534bfb9a9b98a8-fc8b830dab8c5540-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-5694b7163cf7a44cbb5cfe374db32d96-ac997d5108880c42-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "50db4cf98b31e9e0c0a5817c7f8b605c", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal, NullBool: bool)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0022string value\u0022,10s,decimal(0.10101),bool(null)]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal, NullBool: bool)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0022string value\u0022,10s,decimal(0.10101),bool(null)]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "84", "Connection": "keep-alive", "Content-Length": "532", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:37:30 GMT", + "Date": "Tue, 04 May 2021 18:37:05 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-xkvtn", + "Via": "1.1 draft-oms-6c84644dc4-d8d6n", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -101,8 +100,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:37:27.8503722-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:04.8423311-07:00", "RandomSeed": "1735501629", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesAsync.json index cffd32c35b624..a667a517d5e6c 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesAsync.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "342", + "Content-Length": "388", "Content-Type": "application/json", - "traceparent": "00-2ca7770d61574c469fc95db0c168bf9e-204ee734bcae5e46-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-fee1758c542c334a888cb6e98a9263da-9f18e2e26a5b0c46-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "57db0d63af645eca7a022113e537dce2", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal, NullBool: bool)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0022string value\u0022,10s,decimal(0.10101),bool(null)]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal, NullBool: bool)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0022string value\u0022,10s,decimal(0.10101),bool(null)]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "88", + "Age": "92", "Connection": "keep-alive", "Content-Length": "532", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:59 GMT", + "Date": "Tue, 04 May 2021 18:37:13 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-xbs6q", + "Via": "1.1 draft-oms-6c84644dc4-2z78r", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -102,8 +100,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:58.0694838-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:13.1080671-07:00", "RandomSeed": "683651485", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModel.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModel.json index aa31a85866565..565774c41059d 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModel.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModel.json @@ -1,38 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "315", + "Content-Length": "361", "Content-Type": "application/json", - "traceparent": "00-ebcd14f22a93b64485b58b45b3ccadd5-29010fe44ef7bd43-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-a95405e4452c7f41be94a75f91daf4b8-4c2a02d83e5afa4b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "d1e1b22a9b5e8b1aa48c84ef882eb8c7", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "82", "Connection": "keep-alive", "Content-Length": "493", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:37:31 GMT", + "Date": "Tue, 04 May 2021 18:37:05 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-9c28z", + "Via": "1.1 draft-oms-6c84644dc4-62tfl", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -96,8 +95,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:37:30.9875136-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:05.1550269-07:00", "RandomSeed": "944339450", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelAsync.json index 10b16817cf35f..933b27c7fff64 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelAsync.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "315", + "Content-Length": "361", "Content-Type": "application/json", - "traceparent": "00-f4e407d4a7914644b74dae075f3c029f-833a9db9e8dc9d48-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-3cb4932e625ea243bc937a88ba5abd48-f5a3b41a01aa194f-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "38f09510ddc5f7d3071a63aeae3dadce", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "87", + "Age": "90", "Connection": "keep-alive", "Content-Length": "493", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:59 GMT", + "Date": "Tue, 04 May 2021 18:37:13 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-q5vvn", + "Via": "1.1 draft-oms-6c84644dc4-r5jzf", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -97,8 +95,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:59.1742077-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:13.3267570-07:00", "RandomSeed": "1517775869", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullable.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullable.json index d725e5261dd77..d333cb56cf488 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullable.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullable.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "315", + "Content-Length": "361", "Content-Type": "application/json", - "traceparent": "00-f95e342c755a1541b140a9d61a103cdf-8b4d8efbe4985e49-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-e11b60633947514ba21c199e243d3ea5-1b65977553ebee49-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "98b8c415e308f138f95c4bcffb555830", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "0", + "Age": "82", "Connection": "keep-alive", "Content-Length": "493", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:37:32 GMT", + "Date": "Tue, 04 May 2021 18:37:05 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-428hn", + "Via": "1.1 draft-oms-6c84644dc4-4dqzx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -97,8 +95,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:37:31.9378384-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:05.4830219-07:00", "RandomSeed": "679609132", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullableAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullableAsync.json index 983c5d4a77191..ba1a19f58bae6 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullableAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullableAsync.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "315", + "Content-Length": "361", "Content-Type": "application/json", - "traceparent": "00-9b1c41c930901c4cb5da68ea61237ae4-f9c82d3597f0db4d-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-458dc136fb4a5041a8ea48a523122c45-1aef0aae98c5ce45-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "66c86437f3a305b4197b6f76e761890d", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(2015-12-31 23:59:59.9),false,guid(74be27de-1e4e-49d9-b579-fe0b331d3642),12345,1234567890123,12345.6789,\u0027string value\u0027,10s,decimal(0.10101)]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "87", + "Age": "90", "Connection": "keep-alive", "Content-Length": "493", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:59 GMT", + "Date": "Tue, 04 May 2021 18:37:13 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-p59b2", + "Via": "1.1 draft-oms-6c84644dc4-lswqn", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -97,8 +95,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:59.3744166-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:13.6236332-07:00", "RandomSeed": "452841035", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNulls.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNulls.json index 8f65b58704b14..0732ca9d5b3a3 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNulls.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNulls.json @@ -1,38 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "285", + "Content-Length": "331", "Content-Type": "application/json", - "traceparent": "00-5d6d1520240c2b4d973ebef7a0c55c17-d243210251551742-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-69eace3950a58847a930d359bdb2d71d-4de0218f73c40242-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "12ae3d299533e79e36e40102cdf7b0b2", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(null),bool(null),guid(null),int(null),long(null),double(null),\u0027I cant be null\u0027,timespan(null),decimal(null),]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(null),bool(null),guid(null),int(null),long(null),double(null),\u0027I cant be null\u0027,timespan(null),decimal(null),]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "81", "Connection": "keep-alive", "Content-Length": "413", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:37:33 GMT", + "Date": "Tue, 04 May 2021 18:37:06 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-r6xwr", + "Via": "1.1 draft-oms-6c84644dc4-xqzxt", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -96,8 +95,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:37:32.1430457-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:05.7642603-07:00", "RandomSeed": "1837064876", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullsAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullsAsync.json index 6131c9c32e16a..a35b2d07d8954 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullsAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAllSupportedTypesIntoModelNullsAsync.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "285", + "Content-Length": "331", "Content-Type": "application/json", - "traceparent": "00-3bf5aea37f293541b61602456f94a51c-4a449f6e879d0543-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-6bede0bb1d9b4b4c93b3ca42b84314b7-053d59b2e9885e4f-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "c78790299f36174aab985f6afc6f3680", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(null),bool(null),guid(null),int(null),long(null),double(null),\u0027I cant be null\u0027,timespan(null),decimal(null),]" + "query": "datatable (DateTime: datetime, Bool:bool, Guid: guid, Int: int, Long:long, Double: double, String: string, Timespan: timespan, Decimal: decimal)[datetime(null),bool(null),guid(null),int(null),long(null),double(null),\u0027I cant be null\u0027,timespan(null),decimal(null),]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "86", + "Age": "89", "Connection": "keep-alive", "Content-Length": "413", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:59 GMT", + "Date": "Tue, 04 May 2021 18:37:14 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-lb69d", + "Via": "1.1 draft-oms-6c84644dc4-4dqzx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -97,8 +95,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:59.6186866-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:13.8738446-07:00", "RandomSeed": "2117357238", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAsync.json index c20803c5088b1..67ea557698b2f 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryAsync.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "121", + "Content-Length": "167", "Content-Type": "application/json", - "traceparent": "00-133cd09a096f5846ac8806dd1542c190-3b45c2b5fba49542-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-fe35b3f5d82a584c80889cc2515d0ab0-2d22e5021ebc6347-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "619724faaa519c39f43a4ee91f7a72bf", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project StringColumn_s, IntColumn_d, BoolColumn_b, FloatColumn_d |order by StringColumn_s asc" + "query": "TableA1_116_CL |project StringColumn_s, IntColumn_d, BoolColumn_b, FloatColumn_d |order by StringColumn_s asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "1", + "Age": "92", "Connection": "keep-alive", - "Content-Length": "265", + "Content-Length": "279", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:14 GMT", + "Date": "Tue, 04 May 2021 18:37:13 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-hq94g", + "Via": "1.1 draft-oms-6c84644dc4-td7pw", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -69,13 +67,13 @@ "b", 3, true, - 1.2 + 1.20000005 ], [ "c", 1, false, - 1.1 + 1.10000002 ] ] } @@ -84,8 +82,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:14.3630118-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:12.9049029-07:00", "RandomSeed": "1465646503", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatch.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatch.json index a6b4a96113d17..0f89685cb2033 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatch.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatch.json @@ -6,13 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "260", + "Content-Length": "352", "Content-Type": "application/json", - "traceparent": "00-7574c545b51d0d42a3df7648e8cc152e-b686ce088a124e4f-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-5a2f80baad13384f885c1e009c8059bb-5f6ba5e47984bc45-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "71385b2e9566961d382ec20e0e1368c5", "x-ms-return-client-request-id": "true" }, @@ -21,20 +18,22 @@ { "id": "0", "body": { - "query": "Heartbeat" + "query": "Heartbeat", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" }, { "id": "1", "body": { - "query": "Heartbeat" + "query": "Heartbeat", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -44,21 +43,25 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 18:26:26 GMT", + "Date": "Tue, 04 May 2021 18:37:06 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6f48f8487b-pnn8f", + "Via": "1.1 draft-oms-6c84644dc4-gmfnb", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { "responses": [ { - "id": "1", + "id": "0", "status": 200, + "headers": { + "Age": "80", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -191,8 +194,12 @@ } }, { - "id": "0", + "id": "1", "status": 200, + "headers": { + "Age": "80", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -329,8 +336,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T11:26:23.9357405-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:06.0768964-07:00", "RandomSeed": "1735529811", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchAsync.json index 659d92b4d758c..2fbbe5ab0a46d 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchAsync.json @@ -6,13 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "260", + "Content-Length": "352", "Content-Type": "application/json", - "traceparent": "00-25dab67c9f13d3458ac4cebcfc883cff-8d5b83a319843148-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-30483aa48179f5499085e0ebbcd8280e-a772b25ec1302247-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "ea2d66241d6f5f8ec0ff4748506e6f68", "x-ms-return-client-request-id": "true" }, @@ -21,20 +18,22 @@ { "id": "0", "body": { - "query": "Heartbeat" + "query": "Heartbeat", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" }, { "id": "1", "body": { - "query": "Heartbeat" + "query": "Heartbeat", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -44,14 +43,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 18:26:31 GMT", + "Date": "Tue, 04 May 2021 18:37:14 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6f48f8487b-ghgph", + "Via": "1.1 draft-oms-6c84644dc4-272wk", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -60,7 +59,7 @@ "id": "0", "status": 200, "headers": { - "Age": "5", + "Age": "88", "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" }, "body": { @@ -198,7 +197,7 @@ "id": "1", "status": 200, "headers": { - "Age": "5", + "Age": "88", "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" }, "body": { @@ -337,8 +336,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T11:26:31.5549835-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:14.0923443-07:00", "RandomSeed": "163342615", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespan.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespan.json index d3454ba3e2527..951db84cc7ac0 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespan.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespan.json @@ -6,13 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "352", + "Content-Length": "398", "Content-Type": "application/json", - "traceparent": "00-3039d60fda0a09459675a5ed4626b052-f38caa9b962bd146-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-f42de3f08664004ba0802e9696a92de0-da7242b2c619db41-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "d0750064cd74826afe42399856ccfe5d", "x-ms-return-client-request-id": "true" }, @@ -21,21 +18,22 @@ { "id": "0", "body": { - "query": "TableA1_102_CL | project TimeGenerated" + "query": "TableA1_116_CL | project TimeGenerated", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" }, { "id": "1", "body": { - "query": "TableA1_102_CL | project TimeGenerated", - "timespan": "P7DT22H11M33.198912S" + "query": "TableA1_116_CL | project TimeGenerated", + "timespan": "P7DT18H37M6.2800793S" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -45,14 +43,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:11:36 GMT", + "Date": "Tue, 04 May 2021 18:37:06 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6f48f8487b-xph4h", + "Via": "1.1 draft-oms-6c84644dc4-qdpv2", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -60,6 +58,10 @@ { "id": "0", "status": 200, + "headers": { + "Age": "79", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -72,13 +74,13 @@ ], "rows": [ [ - "2021-04-12T00:00:00Z" + "2021-04-26T00:00:00Z" ], [ - "2021-04-14T00:00:00Z" + "2021-04-28T00:00:00Z" ], [ - "2021-04-17T00:00:00Z" + "2021-05-01T00:00:00Z" ] ] } @@ -100,10 +102,10 @@ ], "rows": [ [ - "2021-04-14T00:00:00Z" + "2021-04-28T00:00:00Z" ], [ - "2021-04-17T00:00:00Z" + "2021-05-01T00:00:00Z" ] ] } @@ -115,8 +117,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:11:33.1989120-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:06.2800793-07:00", "RandomSeed": "1342496839", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespanAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespanAsync.json index b9f961c3d88c7..cea90acf0a6c0 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespanAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryBatchWithTimespanAsync.json @@ -6,13 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "353", + "Content-Length": "399", "Content-Type": "application/json", - "traceparent": "00-ed0452a8977bad48955e10819ec390a2-9c3ef3c4bca39343-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-e52224330f6fd143b11d7244518d84f0-b1668b126b68c541-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "fac6616006b1239ae09df6145f0e49e8", "x-ms-return-client-request-id": "true" }, @@ -21,21 +18,22 @@ { "id": "0", "body": { - "query": "TableA1_102_CL | project TimeGenerated" + "query": "TableA1_116_CL | project TimeGenerated", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" }, { "id": "1", "body": { - "query": "TableA1_102_CL | project TimeGenerated", - "timespan": "P7DT22H12M14.5318781S" + "query": "TableA1_116_CL | project TimeGenerated", + "timespan": "P7DT18H37M14.5455387S" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -45,21 +43,25 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:17 GMT", + "Date": "Tue, 04 May 2021 18:37:14 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-j9d4r", + "Via": "1.1 draft-oms-6c84644dc4-5rvww", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { "responses": [ { - "id": "1", + "id": "0", "status": 200, + "headers": { + "Age": "87", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -72,10 +74,13 @@ ], "rows": [ [ - "2021-04-14T00:00:00Z" + "2021-04-26T00:00:00Z" + ], + [ + "2021-04-28T00:00:00Z" ], [ - "2021-04-17T00:00:00Z" + "2021-05-01T00:00:00Z" ] ] } @@ -83,7 +88,7 @@ } }, { - "id": "0", + "id": "1", "status": 200, "body": { "tables": [ @@ -97,13 +102,10 @@ ], "rows": [ [ - "2021-04-12T00:00:00Z" - ], - [ - "2021-04-14T00:00:00Z" + "2021-04-28T00:00:00Z" ], [ - "2021-04-17T00:00:00Z" + "2021-05-01T00:00:00Z" ] ] } @@ -115,8 +117,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:14.5318781-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:14.5455387-07:00", "RandomSeed": "1921044756", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClass.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClass.json index a369bcab230dc..cbc805f388926 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClass.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClass.json @@ -1,38 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "102", + "Content-Length": "148", "Content-Type": "application/json", - "traceparent": "00-e4420e24e775a8429279c93f9b38ee22-5e5c219e801b004a-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-c4cdbe0cb6bddf4db595d2864fe27fd3-e451624b34190f4a-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "d3c806a83a8d010a8270095172b48f15", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |order by Name asc" + "query": "TableA1_116_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |order by Name asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "79", "Connection": "keep-alive", - "Content-Length": "897", + "Content-Length": "911", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:13 GMT", + "Date": "Tue, 04 May 2021 18:37:07 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-6n98v", + "Via": "1.1 draft-oms-6c84644dc4-mhs9c", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -95,48 +94,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -146,8 +145,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:12.5956196-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:07.1006264-07:00", "RandomSeed": "195466269", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClassAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClassAsync.json index ae20c262ccf1c..24831f93cdf90 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClassAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoClassAsync.json @@ -1,39 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "102", + "Content-Length": "148", "Content-Type": "application/json", - "traceparent": "00-15ce2c73e450314283b5cf73fb5beb3e-2b9bfdbb1f9fb84b-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-81b4453fe8dba24496a1220c67a27030-524d26a3bf6dde4b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "c52d0e51e5c8e5c8889a2b4b5aaaf98c", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |order by Name asc" + "query": "TableA1_116_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |order by Name asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "4", + "Age": "90", "Connection": "keep-alive", - "Content-Length": "897", + "Content-Length": "911", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:17 GMT", + "Date": "Tue, 04 May 2021 18:37:18 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-6ddc976cfd-4kgf6", + "Via": "1.1 draft-oms-6c84644dc4-nmj4n", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -96,48 +94,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -147,8 +145,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:17.0851794-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:18.5612587-07:00", "RandomSeed": "2106646577", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionary.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionary.json index 546556768570c..1c6486ff83dbe 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionary.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionary.json @@ -1,35 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "121", + "Content-Length": "167", "Content-Type": "application/json", - "traceparent": "00-8bbb29bb74ff604a8e774169009704c1-844add11d7082f4e-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-c5656762c78efc4d842e4c17d89d298c-f935700052a5de48-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "b0ad0544223e642737428909269feb69", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc" + "query": "TableA1_116_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "79", "Connection": "keep-alive", "Content-Length": "143", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:13 GMT", + "Date": "Tue, 04 May 2021 18:37:07 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-zjwxl", + "Via": "1.1 draft-oms-6c84644dc4-fn7sf", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -66,8 +65,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:13.0477459-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:07.3648895-07:00", "RandomSeed": "472670342", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionaryAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionaryAsync.json index 86e80ef1175a6..df307915e4475 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionaryAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoDictionaryAsync.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "121", + "Content-Length": "167", "Content-Type": "application/json", - "traceparent": "00-b05ecd684ee76949bf009cf83196625c-38652f32ccc80948-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-ee53899ba020294d9b41abed35862ded-f9f139b96f26124d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "91aaebec519299707985f730f4827852", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc" + "query": "TableA1_116_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "3", + "Age": "90", "Connection": "keep-alive", "Content-Length": "143", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:17 GMT", + "Date": "Tue, 04 May 2021 18:37:18 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-zqd9x", + "Via": "1.1 draft-oms-6c84644dc4-vmfjp", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -67,8 +65,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:17.2617128-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:18.6861609-07:00", "RandomSeed": "339337094", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionary.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionary.json index 35d8a7592327e..cf28a8a67111b 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionary.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionary.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "121", + "Content-Length": "167", "Content-Type": "application/json", - "traceparent": "00-cb13392114c2344c99c889af3ec3353e-f7715edaa0ef6b47-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-8b4be422b979f948a24443121740f62e-74d94fabd1693740-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "7fbb71211ffb16371e04010b940f1172", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc" + "query": "TableA1_116_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "0", + "Age": "79", "Connection": "keep-alive", "Content-Length": "143", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:13 GMT", + "Date": "Tue, 04 May 2021 18:37:07 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-bf2tv", + "Via": "1.1 draft-oms-6c84644dc4-bfgjw", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -67,8 +65,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:13.5145004-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:07.5713283-07:00", "RandomSeed": "1236107337", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionaryAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionaryAsync.json index 2e4ebd74b5f2e..9722e4e42febd 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionaryAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoIDictionaryAsync.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "121", + "Content-Length": "167", "Content-Type": "application/json", - "traceparent": "00-d435b1696bb62d4f863b803a1bddc06a-29f4a1b5ef339342-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-23ec9fd0e3feb94c86df90d969443c89-5dc23b2843bdc94e-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "3c22e922ada330b193f7df06379c7892", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc" + "query": "TableA1_116_CL |project-rename Name = StringColumn_s, Age = IntColumn_d |project Name, Age |order by Name asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "5", + "Age": "90", "Connection": "keep-alive", "Content-Length": "143", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:18 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-745q4", + "Via": "1.1 draft-oms-6c84644dc4-c9xd6", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -67,8 +65,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:17.4040564-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:18.8893123-07:00", "RandomSeed": "332246161", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitive.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitive.json index 7b269f269914a..4cfe922ceeb92 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitive.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitive.json @@ -1,35 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-57140c2a9314ac48a96ad439e98f4c34-fbdf7b8224fd1e43-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-2764266415e63043a2b07c99ea487503-e7b9d42a59556041-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "4674e933cf99e7f1c0237fddc5f8a28a", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime) [ datetime(null) ]" + "query": "datatable (DateTime: datetime) [ datetime(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "79", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:36 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-lrrk7", + "Via": "1.1 draft-oms-6c84644dc4-2f2z5", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -52,35 +51,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "49", + "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-8ca6fea97e8d5945ba95e785492b8d6e-54a5ff785d135e4c-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-ad414ee072a2b349a8dad0e4ff0b5dfc-adf0c76595fb2a4e-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "59ddf6b3b2442f100101b05de1df735c", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Bool: bool) [ bool(null) ]" + "query": "datatable (Bool: bool) [ bool(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "78", "Connection": "keep-alive", "Content-Length": "95", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:37 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-942zj", + "Via": "1.1 draft-oms-6c84644dc4-9mjgv", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -103,35 +101,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "49", + "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-3cfad8ff65cdd0489879ae3f5b5365ee-75c5b9512c755a42-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-facb9e906892474f999d9e56fd1b4750-f32867021f0d1343-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "03013b0a14a360a6b712a4a9ee864ea7", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Guid: guid) [ guid(null) ]" + "query": "datatable (Guid: guid) [ guid(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "77", "Connection": "keep-alive", "Content-Length": "95", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:38 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-pqpjh", + "Via": "1.1 draft-oms-6c84644dc4-fwz7k", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -154,35 +151,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "46", + "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-98d01d19d32a584bb85974c1c0c460cb-52e915c50af7d340-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-00ccad592c15d84a95db70b74e19943e-c4e11012bd48b24d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "5f6b41b807d1809cd84545971e9306e1", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Int: int) [ int(null) ]" + "query": "datatable (Int: int) [ int(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "77", "Connection": "keep-alive", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:39 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-sr7sj", + "Via": "1.1 draft-oms-6c84644dc4-tqwms", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -205,35 +201,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "49", + "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-7a9ca271df1e5942ba0db47c7e784c2f-6dee7dd6e44d8249-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-95cb612aed7d4941975a0f343a3cb989-ba82ab969085d34e-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "89d322af9ef69ee6507da1320d67407a", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Long: long) [ long(null) ]" + "query": "datatable (Long: long) [ long(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "77", "Connection": "keep-alive", "Content-Length": "95", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:40 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-pcs7p", + "Via": "1.1 draft-oms-6c84644dc4-r2wd7", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -256,35 +251,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "55", + "Content-Length": "101", "Content-Type": "application/json", - "traceparent": "00-04067525cb61c84a83414b0c87a2ca21-a45328d55fdac544-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-b29bd506e7018142b440ce3ae736725c-233119df8aa2174b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "9fa408b21373028b9f812a5ecf0e4124", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Double: double) [ double(null) ]" + "query": "datatable (Double: double) [ double(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "75", "Connection": "keep-alive", "Content-Length": "97", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:40 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-gd2fk", + "Via": "1.1 draft-oms-6c84644dc4-xfplg", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -307,35 +301,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-344494bff58d1843ac48eb8d8e50a026-53313a498d835448-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-c1c7e3bb642e494db5d02d111d675c3b-5f4a0b76df171a4d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "ccf9c30cc5b31ab05bcc0f53656a7271", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Timespan: timespan) [ timespan(null) ]" + "query": "datatable (Timespan: timespan) [ timespan(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "75", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:40 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-4vp8q", + "Via": "1.1 draft-oms-6c84644dc4-r9pss", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -358,35 +351,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "58", + "Content-Length": "104", "Content-Type": "application/json", - "traceparent": "00-f0ed2a7dec37f8498abd7933a3a7f9ac-032527e9a04b9444-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-05f7489246c6b448bdce6e90a60bf932-79cb8832e8b8e145-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "16e5ca0566ee9c6d96d0e9757488cf41", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Decimal: decimal) [ decimal(null) ]" + "query": "datatable (Decimal: decimal) [ decimal(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "73", "Connection": "keep-alive", "Content-Length": "101", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:41 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-zqm84", + "Via": "1.1 draft-oms-6c84644dc4-xrpff", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -410,8 +402,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:34.7493351-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:07.8853458-07:00", "RandomSeed": "793735302", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveAsync.json index f83d230c43bb9..b3dca7ad9ead7 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveAsync.json @@ -1,35 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-49fb4c62bc2fe74fb182084adb21f013-a66412861b4c4c4a-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-039a5533e5f9a14eb1b98549e0123dff-9058226b9ec8db4d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "538afea8dee92bd43d5ed04ec5bfe76f", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime) [ datetime(null) ]" + "query": "datatable (DateTime: datetime) [ datetime(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "90", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:07 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-4z5mj", + "Via": "1.1 draft-oms-6c84644dc4-gdjsf", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -52,35 +51,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "49", + "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-cbe47ef9dbb1ce48ac7c1e87dc68ea54-6ae4be772390d740-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-a2e7c2bfb8c06a4697dc53ae855d2730-82b91f1532408141-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "dab2f6a747eb888f8095c25ccd275629", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Bool: bool) [ bool(null) ]" + "query": "datatable (Bool: bool) [ bool(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "89", "Connection": "keep-alive", "Content-Length": "95", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:09 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-gnnrk", + "Via": "1.1 draft-oms-6c84644dc4-8fpns", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -103,35 +101,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "49", + "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-c59cdbf2f0fe36439ed9fc90daee3fd4-b14fcfe417e8ec4f-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-8f4ee30625aa9247802d71fa32ec34d3-ecc6c7a3f56a8344-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "3d0b511df9a37f94881a7fd5f05e8e9f", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Guid: guid) [ guid(null) ]" + "query": "datatable (Guid: guid) [ guid(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "88", "Connection": "keep-alive", "Content-Length": "95", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:09 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-xph4h", + "Via": "1.1 draft-oms-6c84644dc4-cl8rl", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -154,35 +151,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "46", + "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-1ad489e0903eba4bacde69641bead0ac-47f9d54144ec8041-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-2ee3ec4f946fd344b0c5d9d453f46184-1f077498f636bb43-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "9729971b8417602a6e02d2531b775d15", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Int: int) [ int(null) ]" + "query": "datatable (Int: int) [ int(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "88", "Connection": "keep-alive", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:09 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-r6pt9", + "Via": "1.1 draft-oms-6c84644dc4-h76tn", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -205,35 +201,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "49", + "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-386014979d16f744bd5634d541e449ac-f9f805ee92d19643-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-5e389c8a8acd4946a2a71b70019b1f4f-e07dd75312fd5d42-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "7431a608a9b3adcb613251d1c8b99722", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Long: long) [ long(null) ]" + "query": "datatable (Long: long) [ long(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "88", "Connection": "keep-alive", "Content-Length": "95", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:10 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-2m6qt", + "Via": "1.1 draft-oms-6c84644dc4-r9574", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -256,35 +251,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "55", + "Content-Length": "101", "Content-Type": "application/json", - "traceparent": "00-493bcae6a927bb4385ed4d836b041d98-7d2d5f46dff3d542-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-cb564910cd1f604a944b527b597edc78-76e48ac275b71e4b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "36412207bffe991226abcfa127406411", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Double: double) [ double(null) ]" + "query": "datatable (Double: double) [ double(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "86", "Connection": "keep-alive", "Content-Length": "97", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:10 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-6rwpz", + "Via": "1.1 draft-oms-6c84644dc4-xd77f", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -307,35 +301,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-4c6d7138f63b5944843b5229e5aea39a-ccdd19ab70ecf248-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-00fc7cef21b99544a3c11d7fdc2825d5-386b6b8650f05e4b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "49cd69bd1a2d72eccb7b35e5335998b4", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Timespan: timespan) [ timespan(null) ]" + "query": "datatable (Timespan: timespan) [ timespan(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "86", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:10 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-th4dg", + "Via": "1.1 draft-oms-6c84644dc4-5r68s", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -358,35 +351,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "58", + "Content-Length": "104", "Content-Type": "application/json", - "traceparent": "00-5bf3681cef3d374b860f600b398600de-f9142b25ce0a0e46-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-9ecf65b10d50e7459d765cb3ebff6125-41f55fe23dfad94d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "f84bb06b2636491794974d08d92a8621", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Decimal: decimal) [ decimal(null) ]" + "query": "datatable (Decimal: decimal) [ decimal(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "84", "Connection": "keep-alive", "Content-Length": "101", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:11 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-ddc4s", + "Via": "1.1 draft-oms-6c84644dc4-7mbw8", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -410,8 +402,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:39:05.6528715-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:18.9986140-07:00", "RandomSeed": "129681988", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNull.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNull.json index a4489c29ae7ff..d224b65df172e 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNull.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNull.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-82e927ee9288ae4c93f3002d0ddbae31-61c38aa581570740-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-4b1b039fd0a55143aedc9574c8305c34-5541c2ab456dd84d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "13bfa12c9afd089e180c9276e05fb92a", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime) [ datetime(null) ]" + "query": "datatable (DateTime: datetime) [ datetime(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "4", + "Age": "79", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:41 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-h4bvx", + "Via": "1.1 draft-oms-6c84644dc4-s48vs", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -54,8 +52,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:41.2377209-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:08.4829622-07:00", "RandomSeed": "1740518380", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNullAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNullAsync.json index 739946ac4d0a0..a020ac235c04e 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNullAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoNullablePrimitiveNullAsync.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-bba37c92f017c54598fe33b633339e3c-ecb200b36378e143-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-3779a8a64946ee428aa695af8fd19b5e-a62df9c191f31849-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "a8c7374903fb4c1f123e364de6e95cc3", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime) [ datetime(null) ]" + "query": "datatable (DateTime: datetime) [ datetime(null) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "3", + "Age": "90", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:11 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-8z6qn", + "Via": "1.1 draft-oms-6c84644dc4-527dh", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -54,8 +52,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:39:11.1021261-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:19.4673660-07:00", "RandomSeed": "1554739528", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitive.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitive.json index b54bec0ac801a..6479cc327f1a1 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitive.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitive.json @@ -1,35 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "78", + "Content-Length": "124", "Content-Type": "application/json", - "traceparent": "00-6d9271191fe7cc4690c720eba0da4e0c-6b7cc65a3cec7b47-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-80bfe561e33b8e478258daf55e5a8092-b75b330839582d44-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "360a26067b2bd173b12121597e434b7c", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]" + "query": "datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "72", "Connection": "keep-alive", "Content-Length": "123", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:42 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-66ghc", + "Via": "1.1 draft-oms-6c84644dc4-g65t6", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -52,35 +51,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "44", + "Content-Length": "90", "Content-Type": "application/json", - "traceparent": "00-3b8a0768b565e044a4eed03202e25904-4622f7292ce64f45-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-0d151a864920e842abbc0348ea702ba2-92009e6a8a582f48-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "7afe957899156f2b14643fb684bb7ab4", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Bool: bool) [ false ]" + "query": "datatable (Bool: bool) [ false ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "72", "Connection": "keep-alive", "Content-Length": "96", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:43 GMT", + "Date": "Tue, 04 May 2021 18:37:08 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-jvsdt", + "Via": "1.1 draft-oms-6c84644dc4-p7t8p", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -103,35 +101,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "81", + "Content-Length": "127", "Content-Type": "application/json", - "traceparent": "00-948f39660a563f44b6d3c9ef76348c99-483418e45e855a46-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-0e02b695a027f245ab1303d7bbd76d52-abee006542465745-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "aa15cb20adf75a8e3095f8d0d19c0170", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]" + "query": "datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "71", "Connection": "keep-alive", "Content-Length": "129", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:43 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-69rzv", + "Via": "1.1 draft-oms-6c84644dc4-m2ssz", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -154,35 +151,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "42", + "Content-Length": "88", "Content-Type": "application/json", - "traceparent": "00-1ed31ce285c4954ebbd883dd2f22dd8d-bd94ea18e3178848-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-26ad2cc6f98a3c4fa757ea97f810eada-25c96a95a6bb8a48-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "ca1d71cf0fd76df9fb9a21c73bbd4df6", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Int: int) [ 12345 ]" + "query": "datatable (Int: int) [ 12345 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "69", "Connection": "keep-alive", "Content-Length": "94", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:43 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-zdpvg", + "Via": "1.1 draft-oms-6c84644dc4-cq6n4", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -205,35 +201,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "52", + "Content-Length": "98", "Content-Type": "application/json", - "traceparent": "00-7cd659d8d1231d498c0d36af621438ea-41853279ca58ee4c-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-beb1d17c356c654e9071d96d81b57813-7dbe9508c60f3049-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "b3396ca7a02eca8407a34a80a15a9d78", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Long: long) [ 1234567890123 ]" + "query": "datatable (Long: long) [ 1234567890123 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "69", "Connection": "keep-alive", "Content-Length": "104", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:45 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-npgz8", + "Via": "1.1 draft-oms-6c84644dc4-td7pw", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -256,35 +251,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "53", + "Content-Length": "99", "Content-Type": "application/json", - "traceparent": "00-7f49e8dc3b668a47bfcf831796f3cbc3-377cfe32c47fae48-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-c04c8b0bdbb0df4db4716dd7253d3c08-32d6cc5228195147-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "12e7cf63af9d10dcd1a8ae5c8cc71f73", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Double: double) [ 12345.6789 ]" + "query": "datatable (Double: double) [ 12345.6789 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "69", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:46 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-qs8fb", + "Via": "1.1 draft-oms-6c84644dc4-jp5ms", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -307,35 +301,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "67", + "Content-Length": "113", "Content-Type": "application/json", - "traceparent": "00-f4d7bae903bff04a8678d83efc181871-88a1ce49657def40-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-70649fcaada9a04ebbb6a93c325dea3f-49dabb11e49c074a-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "642801474e632e42ed52c333c579cca0", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (String: string) [ \u0022string value\u0022 ]" + "query": "datatable (String: string) [ \u0022string value\u0022 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "69", "Connection": "keep-alive", "Content-Length": "109", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:47 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-pn5dw", + "Via": "1.1 draft-oms-6c84644dc4-pkj55", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -358,35 +351,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "50", + "Content-Length": "96", "Content-Type": "application/json", - "traceparent": "00-3f9c75fb616d4f4185806ea2d98d6581-3bf2e19163a49d48-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-62c81b710285084295db721c2e1472ed-ffb4ecf11e8d2d42-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "6c63a8fd3bd6f7589029e186f1273e40", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Timespan: timespan) [ 10s ]" + "query": "datatable (Timespan: timespan) [ 10s ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "68", "Connection": "keep-alive", "Content-Length": "109", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:48 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-hkmbj", + "Via": "1.1 draft-oms-6c84644dc4-nlvx6", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -409,35 +401,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-3c2c0c3be535e64aa0f5019714b2f9b1-85a8f1c4b191ef4a-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-b535746d3e93ab4dbcf5d69d6e9a2fd4-5a81082c8ab3df4d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "9f38d684383215158cb8254beca84b57", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Decimal: decimal) [ decimal(0.10101) ]" + "query": "datatable (Decimal: decimal) [ decimal(0.10101) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "68", "Connection": "keep-alive", "Content-Length": "106", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:38:48 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-ncngj", + "Via": "1.1 draft-oms-6c84644dc4-gnz7x", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -461,8 +452,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:38:41.4578100-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:08.6864292-07:00", "RandomSeed": "1457666448", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveAsync.json index 82dfbf2075a1d..335128096ff57 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveAsync.json @@ -1,35 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "78", + "Content-Length": "124", "Content-Type": "application/json", - "traceparent": "00-0b52f3a3bd7b9843bce4bda18db88efc-486dad8f9a152e4b-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-0b4a85e0fa22064c8819022e8785e2ab-8f91b22b8f26144d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "fa641e04f95286221788805ede7da002", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]" + "query": "datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "83", "Connection": "keep-alive", "Content-Length": "123", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:11 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-cwrj5", + "Via": "1.1 draft-oms-6c84644dc4-xqzxt", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -52,35 +51,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "44", + "Content-Length": "90", "Content-Type": "application/json", - "traceparent": "00-553a24a41eff3946b52760bfa5144014-721dcf1cb3b9bd4a-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-fb7d7196bcd3d94697cf9d6f4be455ef-aab2bea9c64a474b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "52ba1cef7b7b82867d887ea1257bf1b6", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Bool: bool) [ false ]" + "query": "datatable (Bool: bool) [ false ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "82", "Connection": "keep-alive", "Content-Length": "96", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:12 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-q46vc", + "Via": "1.1 draft-oms-6c84644dc4-62tfl", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -103,35 +101,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "81", + "Content-Length": "127", "Content-Type": "application/json", - "traceparent": "00-ae01c4c719b14e49b0f310e298cb8705-0afed31db703f644-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-bd3a5916b5240a4cbc3f946933d2c083-4b18109fe3edd145-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "59214f1e8400aac00ffd4ccd966b2372", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]" + "query": "datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "82", "Connection": "keep-alive", "Content-Length": "129", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:14 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-gqct6", + "Via": "1.1 draft-oms-6c84644dc4-hnflv", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -154,35 +151,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "42", + "Content-Length": "88", "Content-Type": "application/json", - "traceparent": "00-537f8f4d4ef8ba489b985249c4f6621f-7752b909e8ec6841-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-5f561d6a31666e4cb403dcd29ecb4319-4bfa5ee81113bc43-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "e26b330084c8898b97e27dc97a80609b", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Int: int) [ 12345 ]" + "query": "datatable (Int: int) [ 12345 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "80", "Connection": "keep-alive", "Content-Length": "94", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:14 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-h9fzx", + "Via": "1.1 draft-oms-6c84644dc4-r9574", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -205,35 +201,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "52", + "Content-Length": "98", "Content-Type": "application/json", - "traceparent": "00-c8d366bbe7157d46ae13085120f0efd7-3e7e707448049641-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-2afa81bf5096cf43a7f1cbcbbf35204c-99b9b5394c520a47-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "8e3fca96475c6a015c0f427e2eb9eb11", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Long: long) [ 1234567890123 ]" + "query": "datatable (Long: long) [ 1234567890123 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "80", "Connection": "keep-alive", "Content-Length": "104", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:14 GMT", + "Date": "Tue, 04 May 2021 18:37:19 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-f5pv2", + "Via": "1.1 draft-oms-6c84644dc4-4vrdq", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -256,35 +251,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "53", + "Content-Length": "99", "Content-Type": "application/json", - "traceparent": "00-af3130b652f2cd4f98bf3cbb09bcab1f-47b7f6adff0a4648-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-b140227b722d5a4d9a8802abeffc4d1e-ef4e3dcd8e51c74a-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "f2a10b650f109aedc497c11e06f6308e", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Double: double) [ 12345.6789 ]" + "query": "datatable (Double: double) [ 12345.6789 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "80", "Connection": "keep-alive", "Content-Length": "103", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:15 GMT", + "Date": "Tue, 04 May 2021 18:37:20 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-vmv7q", + "Via": "1.1 draft-oms-6c84644dc4-k8rd9", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -307,35 +301,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "67", + "Content-Length": "113", "Content-Type": "application/json", - "traceparent": "00-2d9c871e94343843b3f4dba283655f7f-dd4b3a3325ffba40-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-9a77e02292f65942888e1e55709cc7a1-0d22f38779f63b47-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "cc36b19c942cb815310086b9410c5add", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (String: string) [ \u0022string value\u0022 ]" + "query": "datatable (String: string) [ \u0022string value\u0022 ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "80", "Connection": "keep-alive", "Content-Length": "109", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:15 GMT", + "Date": "Tue, 04 May 2021 18:37:20 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-g7mpc", + "Via": "1.1 draft-oms-6c84644dc4-28sqx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -358,35 +351,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "50", + "Content-Length": "96", "Content-Type": "application/json", - "traceparent": "00-094da9a9c025414f983a4ed9a3b79af0-8a6be052fc41ef4f-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-37c7d3ba86007f49a2c4edcfcfb47fdc-7c12bbc8627c6c47-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "6e646bf66ede878adda5c9c585e36465", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Timespan: timespan) [ 10s ]" + "query": "datatable (Timespan: timespan) [ 10s ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "80", "Connection": "keep-alive", "Content-Length": "109", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:16 GMT", + "Date": "Tue, 04 May 2021 18:37:20 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-f5pv2", + "Via": "1.1 draft-oms-6c84644dc4-qn6vm", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -409,35 +401,34 @@ } }, { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "61", + "Content-Length": "107", "Content-Type": "application/json", - "traceparent": "00-7a84bb160e030443902c3f422b813b42-c4d1aab08edd384c-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-8bad32e1fc923847899214fa0151157f-f3376353fe286342-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "7de1b3df1f82d1e5f6e8c010893459b7", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "datatable (Decimal: decimal) [ decimal(0.10101) ]" + "query": "datatable (Decimal: decimal) [ decimal(0.10101) ]", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "79", "Connection": "keep-alive", "Content-Length": "106", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:39:16 GMT", + "Date": "Tue, 04 May 2021 18:37:20 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6f48f8487b-l6k4k", + "Via": "1.1 draft-oms-6c84644dc4-47dnd", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -461,8 +452,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:39:11.2480500-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:19.6549366-07:00", "RandomSeed": "560728092", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveInt.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveInt.json index 5729f4c450f16..987195fe8e849 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveInt.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveInt.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "34", + "Content-Length": "80", "Content-Type": "application/json", - "traceparent": "00-5d0569ec06ce5a44b99a001e21e5c593-0b8cefcf01a80d43-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-64ae251b2b24e64cad94059c5a29de88-ea64d9a422f06f40-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "5ec21abf78f6a1dd6cef86f3bb6aec9e", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL | count" + "query": "TableA1_116_CL | count", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "69", + "Age": "89", "Connection": "keep-alive", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:13 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-5gmt2", + "Via": "1.1 draft-oms-6c84644dc4-lmtrc", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -54,8 +52,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:13.6962541-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:09.3268151-07:00", "RandomSeed": "456729592", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveIntAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveIntAsync.json index 77f7b48af85ef..8954c650f814c 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveIntAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveIntAsync.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "34", + "Content-Length": "80", "Content-Type": "application/json", - "traceparent": "00-3d1f08f120a16845a55efcf4a89fb32b-bc58efe392c9d74b-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-bafa18cb459dd347bd46fc95d668aecd-e5a88efafa753c49-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "dd8956f22e601ba7a377bf5f63d4c6f7", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL | count" + "query": "TableA1_116_CL | count", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "74", + "Age": "100", "Connection": "keep-alive", "Content-Length": "93", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:18 GMT", + "Date": "Tue, 04 May 2021 18:37:20 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-ltwcf", + "Via": "1.1 draft-oms-6c84644dc4-hnx2d", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -54,8 +52,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:18.8074465-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:20.5926733-07:00", "RandomSeed": "765892111", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveString.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveString.json index 16673f531e67c..b7d2731117756 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveString.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveString.json @@ -1,35 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "81", + "Content-Length": "127", "Content-Type": "application/json", - "traceparent": "00-6222bfc178146f42810924284b4079e7-a41884ee26400e4c-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-56cafe5133ce8546b74d0d952de0e71e-be6176bc67baf945-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "b8c3caa6f1ef92ff2515aa87f92bda6c", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL | project StringColumn_s | order by StringColumn_s asc" + "query": "TableA1_116_CL | project StringColumn_s | order by StringColumn_s asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "68", "Connection": "keep-alive", "Content-Length": "118", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:14 GMT", + "Date": "Tue, 04 May 2021 18:37:09 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-qs8fb", + "Via": "1.1 draft-oms-6c84644dc4-h4srp", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -59,8 +58,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:13.9077651-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:09.5298287-07:00", "RandomSeed": "2059659621", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveStringAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveStringAsync.json index 7ede3b857415c..c33a88fc506aa 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveStringAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryIntoPrimitiveStringAsync.json @@ -1,36 +1,34 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "81", + "Content-Length": "127", "Content-Type": "application/json", - "traceparent": "00-16df9b93d2c17e4c8cac8858b684248e-fa3846c9d91c2c46-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-820b4385b630d44682064d983ef59047-5ddbd2eb0b650e4d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "425a6d47cfaf90461ac9211672bd02f1", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL | project StringColumn_s | order by StringColumn_s asc" + "query": "TableA1_116_CL | project StringColumn_s | order by StringColumn_s asc", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "4", + "Age": "79", "Connection": "keep-alive", "Content-Length": "118", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:19 GMT", + "Date": "Tue, 04 May 2021 18:37:21 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-hkmbj", + "Via": "1.1 draft-oms-6c84644dc4-rkdq4", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -60,8 +58,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:18.9736778-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:20.9363912-07:00", "RandomSeed": "221477876", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False).json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False).json index af43cf4e27742..a9b0dd5579fa2 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False).json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False).json @@ -1,35 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "26", + "Content-Length": "72", "Content-Type": "application/json", - "traceparent": "00-b8844510f3c36a40926807df74b4362c-c025023e6d13244b-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-4df031112579bb49a45523c1ea2d9f0f-24d05ec22b5dff46-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "e0631063d913e4fb77da0396016c7203", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "68", "Connection": "keep-alive", - "Content-Length": "915", + "Content-Length": "929", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:26:01 GMT", + "Date": "Tue, 04 May 2021 18:37:12 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-57c6b45486-zhn7k", + "Via": "1.1 draft-oms-6c84644dc4-rkdq4", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -92,48 +94,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -143,8 +145,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:26:00.5655230-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:12.4048879-07:00", "RandomSeed": "649791919", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False)Async.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False)Async.json index 68d22890d2e5a..affc5cbe12695 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False)Async.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(False)Async.json @@ -1,36 +1,37 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "26", + "Content-Length": "72", "Content-Type": "application/json", - "traceparent": "00-26767918909ef245a54991b1371d60fe-f8860cb6cf437749-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-551cdb6361f338408b79fad5469116c6-0388fbc9434ec146-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "5a8f839466c9358e3bf1e44c38de40e3", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "5", + "Age": "81", "Connection": "keep-alive", - "Content-Length": "915", + "Content-Length": "929", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:26:06 GMT", + "Date": "Tue, 04 May 2021 18:37:25 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-57c6b45486-2hxkv", + "Via": "1.1 draft-oms-6c84644dc4-rrzxn", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -93,48 +94,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -144,8 +145,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:26:06.3488522-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:25.4049303-07:00", "RandomSeed": "2073931437", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True).json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True).json index 9e01bf29c7a95..1d634cf18a5e9 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True).json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True).json @@ -1,36 +1,38 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "26", + "Content-Length": "72", "Content-Type": "application/json", "Prefer": " include-statistics=true", - "traceparent": "00-341acb7204fba842856e61d4310006ca-93919642d23a4d4c-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-f075be8203c0eb4aaac89356edf0e6da-d9852b721f807b48-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "530ebcf3be3d499eac2baf959539ff7f", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "67", "Connection": "keep-alive", - "Content-Length": "1686", + "Content-Length": "1684", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:34:45 GMT", + "Date": "Tue, 04 May 2021 18:37:12 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-swbjx", + "Via": "1.1 draft-oms-6c84644dc4-pqd9b", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -93,48 +95,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -142,13 +144,13 @@ ], "statistics": { "query": { - "executionTime": 0.0312676, + "executionTime": 0.0156271, "resourceUsage": { "cache": { "memory": { - "hits": 26, + "hits": 32, "misses": 0, - "total": 26 + "total": 32 }, "disk": { "hits": 0, @@ -170,20 +172,20 @@ } }, "cpu": { - "user": "00:00:00.0156250", + "user": "00:00:00", "kernel": "00:00:00", - "totalCpu": "00:00:00.0156250" + "totalCpu": "00:00:00" }, "memory": { - "peakPerNode": 1048768 + "peakPerNode": 4195648 } }, "inputDatasetStatistics": { "extents": { "total": 1, "scanned": 1, - "scannedMinDatetime": "2021-04-20T22:10:44.3431836Z", - "scannedMaxDatetime": "2021-04-20T22:10:44.3431836Z" + "scannedMinDatetime": "2021-05-04T18:10:50.2570785Z", + "scannedMaxDatetime": "2021-05-04T18:10:50.2570785Z" }, "rows": { "total": 3, @@ -210,8 +212,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:34:45.2069841-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:12.2019242-07:00", "RandomSeed": "89860256", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True)Async.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True)Async.json index da8ec430423ca..74148569ff4d1 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True)Async.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatistics(True)Async.json @@ -1,36 +1,38 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "26", + "Content-Length": "72", "Content-Type": "application/json", "Prefer": " include-statistics=true", - "traceparent": "00-9e63ee7f54a3684382c82a07e48e712f-79a621111d664240-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-f715af4b86aca048b5dac2a7c6dfed20-d172d3f32f45e24f-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "9c7b8aacfa4075865bbbd8ca47d129af", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "80", "Connection": "keep-alive", - "Content-Length": "1686", + "Content-Length": "1684", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:17:07 GMT", + "Date": "Tue, 04 May 2021 18:37:25 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-tzgcp", + "Via": "1.1 draft-oms-6c84644dc4-5whbm", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -93,48 +95,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -142,13 +144,13 @@ ], "statistics": { "query": { - "executionTime": 0.0155889, + "executionTime": 0.0156271, "resourceUsage": { "cache": { "memory": { - "hits": 26, + "hits": 32, "misses": 0, - "total": 26 + "total": 32 }, "disk": { "hits": 0, @@ -170,20 +172,20 @@ } }, "cpu": { - "user": "00:00:00.0156250", + "user": "00:00:00", "kernel": "00:00:00", - "totalCpu": "00:00:00.0156250" + "totalCpu": "00:00:00" }, "memory": { - "peakPerNode": 5348256 + "peakPerNode": 4195648 } }, "inputDatasetStatistics": { "extents": { "total": 1, "scanned": 1, - "scannedMinDatetime": "2021-04-20T22:10:44.3431836Z", - "scannedMaxDatetime": "2021-04-20T22:10:44.3431836Z" + "scannedMinDatetime": "2021-05-04T18:10:50.2570785Z", + "scannedMaxDatetime": "2021-05-04T18:10:50.2570785Z" }, "rows": { "total": 3, @@ -210,8 +212,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:17:02.9731778-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:25.2958153-07:00", "RandomSeed": "321992665", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False).json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False).json index 1b48dc577abd0..a37c74b5cd9b5 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False).json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False).json @@ -6,10 +6,13 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "142", + "Content-Length": "188", "Content-Type": "application/json", - "traceparent": "00-ae4eb422fb418d4d9c41e86999aab302-6135812a7dff8d41-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-c20924a4911c5443b1f32873fc1c4680-d7b59aa9c4a3dd49-00", + "User-Agent": [ + "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1", + "(.NET 5.0.5; Microsoft Windows 10.0.19042)" + ], "x-ms-client-request-id": "754bbca68f52ede3d22604ece195ea23", "x-ms-return-client-request-id": "true" }, @@ -18,11 +21,12 @@ { "id": "0", "body": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -32,14 +36,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:34:51 GMT", + "Date": "Tue, 04 May 2021 18:37:55 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-6gx2c", + "Via": "1.1 draft-oms-6c84644dc4-8hrd8", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -47,6 +51,10 @@ { "id": "0", "status": 200, + "headers": { + "Age": "111", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -107,48 +115,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -161,8 +169,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:34:50.5985603-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:54.6603292-07:00", "RandomSeed": "937834533", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False)Async.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False)Async.json index 1096e1ce545ac..72e1f6dedb48f 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False)Async.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(False)Async.json @@ -6,10 +6,13 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "142", + "Content-Length": "188", "Content-Type": "application/json", - "traceparent": "00-c56ca2c89644594a9bc290f67ae69976-4b9941a1a5bbe841-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-54a0382d34e3ce48a7cd19ae225b4394-6277a0bd6d26b648-00", + "User-Agent": [ + "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1", + "(.NET 5.0.5; Microsoft Windows 10.0.19042)" + ], "x-ms-client-request-id": "1b967d63b3f2b19e7c754a8b5f43aaec", "x-ms-return-client-request-id": "true" }, @@ -18,11 +21,12 @@ { "id": "0", "body": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -32,14 +36,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:27:11 GMT", + "Date": "Tue, 04 May 2021 18:37:56 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-zwf9s", + "Via": "1.1 draft-oms-6c84644dc4-st8z5", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -47,6 +51,10 @@ { "id": "0", "status": 200, + "headers": { + "Age": "112", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -107,48 +115,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -161,8 +169,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:27:05.5502268-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:55.9548962-07:00", "RandomSeed": "525536773", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True).json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True).json index be3a888fe125c..f458423416dc5 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True).json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True).json @@ -6,10 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "190", + "Content-Length": "236", "Content-Type": "application/json", - "traceparent": "00-6d69cace0730fc4491af8912bbba249a-7537a63eb308384c-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-61253208b2394c4789e455ce2ef5f5d2-4639cdf6d4bc9e40-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "e15c344896d3896b1a1a36264d0d9b30", "x-ms-return-client-request-id": "true" }, @@ -21,11 +21,12 @@ "prefer": " include-statistics=true" }, "body": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -35,14 +36,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:34:50 GMT", + "Date": "Tue, 04 May 2021 18:37:12 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-fw9gv", + "Via": "1.1 draft-oms-6c84644dc4-hnflv", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -50,6 +51,10 @@ { "id": "0", "status": 200, + "headers": { + "Age": "67", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -110,48 +115,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -159,13 +164,13 @@ ], "statistics": { "query": { - "executionTime": 2.0781945, + "executionTime": 0.0312532, "resourceUsage": { "cache": { "memory": { - "hits": 26, + "hits": 32, "misses": 0, - "total": 26 + "total": 32 }, "disk": { "hits": 0, @@ -192,15 +197,15 @@ "totalCpu": "00:00:00.0312500" }, "memory": { - "peakPerNode": 6921968 + "peakPerNode": 3670720 } }, "inputDatasetStatistics": { "extents": { "total": 1, "scanned": 1, - "scannedMinDatetime": "2021-04-20T22:10:44.3431836Z", - "scannedMaxDatetime": "2021-04-20T22:10:44.3431836Z" + "scannedMinDatetime": "2021-05-04T18:10:50.2570785Z", + "scannedMaxDatetime": "2021-05-04T18:10:50.2570785Z" }, "rows": { "total": 3, @@ -230,8 +235,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:34:45.9625940-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:12.6080545-07:00", "RandomSeed": "471662810", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True)Async.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True)Async.json index 363d7a38dd0d1..ee5d2b56501de 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True)Async.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithStatisticsBatch(True)Async.json @@ -6,10 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "190", + "Content-Length": "236", "Content-Type": "application/json", - "traceparent": "00-a4aad11f33945249a9f77310dd8df252-a01810865abbc146-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-938b2a3eb668304d91f2579b7991a973-38e6e224468a9949-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "e7225792ee0fb81fc825b0c62e8c1f59", "x-ms-return-client-request-id": "true" }, @@ -21,11 +21,12 @@ "prefer": " include-statistics=true" }, "body": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -35,14 +36,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:27:45 GMT", + "Date": "Tue, 04 May 2021 18:37:25 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-l78gm", + "Via": "1.1 draft-oms-6c84644dc4-lxnf6", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -50,6 +51,10 @@ { "id": "0", "status": 200, + "headers": { + "Age": "80", + "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" + }, "body": { "tables": [ { @@ -110,48 +115,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -159,13 +164,13 @@ ], "statistics": { "query": { - "executionTime": 0.0156248, + "executionTime": 0.0312532, "resourceUsage": { "cache": { "memory": { - "hits": 26, + "hits": 32, "misses": 0, - "total": 26 + "total": 32 }, "disk": { "hits": 0, @@ -187,20 +192,20 @@ } }, "cpu": { - "user": "00:00:00", + "user": "00:00:00.0312500", "kernel": "00:00:00", - "totalCpu": "00:00:00" + "totalCpu": "00:00:00.0312500" }, "memory": { - "peakPerNode": 4824320 + "peakPerNode": 3670720 } }, "inputDatasetStatistics": { "extents": { "total": 1, "scanned": 1, - "scannedMinDatetime": "2021-04-20T22:10:44.3431836Z", - "scannedMaxDatetime": "2021-04-20T22:10:44.3431836Z" + "scannedMinDatetime": "2021-05-04T18:10:50.2570785Z", + "scannedMaxDatetime": "2021-05-04T18:10:50.2570785Z" }, "rows": { "total": 3, @@ -230,8 +235,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:27:43.4044034-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:25.7173262-07:00", "RandomSeed": "1838021031", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespan.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespan.json index eddf825caee8c..d27b13cfdbac4 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespan.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespan.json @@ -1,24 +1,21 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "84", "Content-Type": "application/json", - "traceparent": "00-b1daf6db25d90644a7dab82a9340c341-dd18f6c005a34e4e-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-39fb2970c538b3488f89301c80033554-166b5266119c7446-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "ef888e0b48e04b118dccb2adc69443e0", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL | project TimeGenerated", - "timespan": "P7DT22H2M23.3719678S" + "query": "TableA1_116_CL | project TimeGenerated", + "timespan": "P7DT18H37M9.8267504S" }, "StatusCode": 200, "ResponseHeaders": { @@ -27,10 +24,10 @@ "Connection": "keep-alive", "Content-Length": "151", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:11:04 GMT", + "Date": "Tue, 04 May 2021 18:37:10 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-6n8cb", + "Via": "1.1 draft-oms-6c84644dc4-jbp94", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -45,10 +42,10 @@ ], "rows": [ [ - "2021-04-14T00:00:00Z" + "2021-04-28T00:00:00Z" ], [ - "2021-04-17T00:00:00Z" + "2021-05-01T00:00:00Z" ] ] } @@ -57,9 +54,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:02:23.3719678-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:09.8267504-07:00", "RandomSeed": "479188848", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254", - "WORKSPACE_KEY": "Kg==" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespanAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespanAsync.json index ed8e2d8c2e255..e7576824b54ef 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespanAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanQueryWithTimespanAsync.json @@ -1,24 +1,21 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "85", "Content-Type": "application/json", - "traceparent": "00-ecf7c81770bed74d96e7924155ec4f44-1d2a5c948ec8de4c-00", - "User-Agent": [ - "azsdk-net-Monitory.Query/1.0.0-alpha.20210420.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-a6efe766850f7f4b9841a752e21c015a-fcbfda7c94e41549-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "78a3791e3c716b70d3bb26a4aa909da5", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL | project TimeGenerated", - "timespan": "P7DT22H12M19.1396417S" + "query": "TableA1_116_CL | project TimeGenerated", + "timespan": "P7DT18H37M21.1551195S" }, "StatusCode": 200, "ResponseHeaders": { @@ -27,10 +24,10 @@ "Connection": "keep-alive", "Content-Length": "151", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 20 Apr 2021 22:12:19 GMT", + "Date": "Tue, 04 May 2021 18:37:22 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-6ddc976cfd-drfvq", + "Via": "1.1 draft-oms-6c84644dc4-fqxsd", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -45,10 +42,10 @@ ], "rows": [ [ - "2021-04-14T00:00:00Z" + "2021-04-28T00:00:00Z" ], [ - "2021-04-17T00:00:00Z" + "2021-05-01T00:00:00Z" ] ] } @@ -57,8 +54,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-20T15:12:19.1396417-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:21.1551195-07:00", "RandomSeed": "388550729", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeout.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeout.json index 3ed7d768459e7..6b62b999f6154 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeout.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeout.json @@ -1,37 +1,38 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "26", + "Content-Length": "72", "Content-Type": "application/json", "Prefer": "wait=600", - "traceparent": "00-df29be0a9c18924baad3e7e06c60e87b-91a47b12f8cd7544-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-b3aea9130f79bb4689c448329ec206db-9bbbf70b15c5f24a-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "6f2a881af2d0cc7f1d2dc5f84904637e", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", + "Age": "66", "Connection": "keep-alive", - "Content-Length": "915", + "Content-Length": "929", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:34:45 GMT", - "Preference-Applied": "wait=600", + "Date": "Tue, 04 May 2021 18:37:10 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-cw97c", + "Via": "1.1 draft-oms-6c84644dc4-d6p68", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -94,48 +95,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -145,8 +146,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:34:41.3911407-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:10.1865400-07:00", "RandomSeed": "253792280", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeoutAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeoutAsync.json index 198f76eaedf7f..7ed54b4892d05 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeoutAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/CanSetServiceTimeoutAsync.json @@ -1,37 +1,38 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "26", + "Content-Length": "72", "Content-Type": "application/json", "Prefer": "wait=600", - "traceparent": "00-fd282b8917a3084eb5773f8b41b49c44-a9adce7b1f037641-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-ca7da5ca33a56e439240957b380fc187-bc825933997d0546-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "cfe8abf5d78d7c9397f96c8cc052cbc0", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 200, "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "6", + "Age": "78", "Connection": "keep-alive", - "Content-Length": "915", + "Content-Length": "929", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 20:34:51 GMT", + "Date": "Tue, 04 May 2021 18:37:22 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-7d8dfb7986-5tkpt", + "Via": "1.1 draft-oms-6c84644dc4-dm927", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -94,48 +95,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -145,8 +146,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T13:34:51.4558310-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:22.1398045-07:00", "RandomSeed": "429621551", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFound.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFound.json index 8693c89e5038e..a67516fb4310d 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFound.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFound.json @@ -6,10 +6,13 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "142", + "Content-Length": "188", "Content-Type": "application/json", - "traceparent": "00-4d8f6ab5f4406d44848007c06c4d9480-90a9c55b5a6d814f-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-3f46b8d8d6f5a64abcf221a9aac5f52b-e0a6262deef6b14e-00", + "User-Agent": [ + "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1", + "(.NET 5.0.5; Microsoft Windows 10.0.19042)" + ], "x-ms-client-request-id": "91f4adc96435290d4280185fdf573b81", "x-ms-return-client-request-id": "true" }, @@ -18,11 +21,12 @@ { "id": "0", "body": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -32,14 +36,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 17:28:29 GMT", + "Date": "Tue, 04 May 2021 18:37:55 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-778c644d5b-cmht8", + "Via": "1.1 draft-oms-6c84644dc4-ls5rt", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -48,7 +52,7 @@ "id": "0", "status": 200, "headers": { - "Age": "97", + "Age": "111", "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" }, "body": { @@ -111,48 +115,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -165,8 +169,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T10:28:27.1772242-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:55.8758609-07:00", "RandomSeed": "79312884", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFoundAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFoundAsync.json index 5fd0920ce2de1..4d53d7a1c0625 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFoundAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenBatchQueryNotFoundAsync.json @@ -6,10 +6,13 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "142", + "Content-Length": "188", "Content-Type": "application/json", - "traceparent": "00-79972b83e0b85547924ac5dd58a39b17-df374d5effdd7a43-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-5103c14e646a784280719b4b7bdc4c77-05e0d34d2afe4d40-00", + "User-Agent": [ + "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1", + "(.NET 5.0.5; Microsoft Windows 10.0.19042)" + ], "x-ms-client-request-id": "727770ed17ef619d19e48ec7ee5cf505", "x-ms-return-client-request-id": "true" }, @@ -18,11 +21,12 @@ { "id": "0", "body": { - "query": "TableA1_102_CL" + "query": "TableA1_116_CL", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -32,14 +36,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 17:28:29 GMT", + "Date": "Tue, 04 May 2021 18:37:56 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-778c644d5b-np5wq", + "Via": "1.1 draft-oms-6c84644dc4-nmj4n", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -48,7 +52,7 @@ "id": "0", "status": 200, "headers": { - "Age": "98", + "Age": "112", "request-context": "appId=cid-v1:70941e4f-7e8f-40b7-b730-183893db0297" }, "body": { @@ -111,48 +115,48 @@ ], "rows": [ [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-12T00:00:00Z", + "2021-04-26T00:00:00Z", "", "", 1, "a", false, 0, - "TableA1_102_CL", + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-14T00:00:00Z", + "2021-04-28T00:00:00Z", "", "", 3, "b", true, - 1.2, - "TableA1_102_CL", + 1.20000005, + "TableA1_116_CL", "" ], [ - "9a15b791-8d2f-436f-a734-25d128c72254", + "bb1b4371-062d-414d-bef3-b0d124ff721c", "RestAPI", "", "", - "2021-04-17T00:00:00Z", + "2021-05-01T00:00:00Z", "", "", 1, "c", false, - 1.1, - "TableA1_102_CL", + 1.10000002, + "TableA1_116_CL", "" ] ] @@ -165,8 +169,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T10:28:29.4509924-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:56.2950165-07:00", "RandomSeed": "1493790199", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFails.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFails.json index d3a0a488cc5e5..fb493740e2b15 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFails.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFails.json @@ -1,20 +1,21 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "32", + "Content-Length": "78", "Content-Type": "application/json", - "traceparent": "00-47c96303e79ae64eb65500cc915a8a56-58663260b2dccc4b-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-905268170a27f34e8d16372642d307ff-247bc2bb2a42d040-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "7da29de1d51011d7e4aff1b3c9c32a3e", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "this won\u0027t work" + "query": "this won\u0027t work", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 400, "ResponseHeaders": { @@ -23,17 +24,17 @@ "Connection": "keep-alive", "Content-Length": "423", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 16:57:45 GMT", + "Date": "Tue, 04 May 2021 18:37:11 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-778c644d5b-xz7rk", + "Via": "1.1 draft-oms-6c84644dc4-ftkqb", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { "error": { "message": "The request had some invalid properties", "code": "BadArgumentError", - "correlationId": "93079145-4d01-4909-9cf3-acd782dea6fe", + "correlationId": "ddf607a7-d998-4178-bc0b-d09daac37a3e", "innererror": { "code": "SyntaxError", "message": "Request is invalid and cannot be processed: Syntax error: SYN0001: I could not parse that, sorry. [line:position=0:0]. Query: \u0027let [\u0027emptyTable\u0027] = view () { datatable(column:string)[] };restrict access to (*);\r\nthis won\u0027t work\u0027" @@ -43,8 +44,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T09:57:42.4580725-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:10.5298323-07:00", "RandomSeed": "1125575113", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsAsync.json index db57008c4155b..5ac940217ad46 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsAsync.json @@ -1,20 +1,21 @@ { "Entries": [ { - "RequestUri": "https://api.loganalytics.io/v1/workspaces/9a15b791-8d2f-436f-a734-25d128c72254/query", + "RequestUri": "https://api.loganalytics.io/v1/workspaces/bb1b4371-062d-414d-bef3-b0d124ff721c/query", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "32", + "Content-Length": "78", "Content-Type": "application/json", - "traceparent": "00-841b384131b1eb4aa010c08f4f4898b2-d69c35b5f668c24d-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-f3a08b5199e5924c98bd43b61f5eef6f-34cce3b2dac17c43-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "69272719ec966dc0d767e2a490f3aed5", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "query": "this won\u0027t work" + "query": "this won\u0027t work", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "StatusCode": 400, "ResponseHeaders": { @@ -23,17 +24,17 @@ "Connection": "keep-alive", "Content-Length": "423", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 16:56:00 GMT", + "Date": "Tue, 04 May 2021 18:37:24 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-778c644d5b-brthf", + "Via": "1.1 draft-oms-6c84644dc4-tvtw8", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { "error": { "message": "The request had some invalid properties", "code": "BadArgumentError", - "correlationId": "74310ce9-9a8a-4bbd-9eb7-171c59a83ee9", + "correlationId": "4d4f9829-b5d9-4b46-87d6-02e586715001", "innererror": { "code": "SyntaxError", "message": "Request is invalid and cannot be processed: Syntax error: SYN0001: I could not parse that, sorry. [line:position=0:0]. Query: \u0027let [\u0027emptyTable\u0027] = view () { datatable(column:string)[] };restrict access to (*);\r\nthis won\u0027t work\u0027" @@ -43,8 +44,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T09:55:58.3723633-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:22.4831807-07:00", "RandomSeed": "977279808", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatch.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatch.json index 7ee60d1009321..9c1edd4f7ffe4 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatch.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatch.json @@ -6,10 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "148", + "Content-Length": "194", "Content-Type": "application/json", - "traceparent": "00-ea0ce86dac33974e95f271a9dd1d1f92-2c58d14c9685b945-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-0d6e98cb3e6c724d9151e336fb1018ae-9423287c0f2cb044-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "6e01ed65a2d698f66d1915a5f9ba5732", "x-ms-return-client-request-id": "true" }, @@ -18,11 +18,12 @@ { "id": "0", "body": { - "query": "this won\u0027t work" + "query": "this won\u0027t work", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -32,14 +33,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 17:20:17 GMT", + "Date": "Tue, 04 May 2021 18:37:12 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-778c644d5b-k6t8c", + "Via": "1.1 draft-oms-6c84644dc4-kq5rm", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -51,7 +52,7 @@ "error": { "message": "The request had some invalid properties", "code": "BadArgumentError", - "correlationId": "a0df67e9-32ea-4781-b481-784d861467d6", + "correlationId": "d9aace2c-0e82-4596-a777-02c105ab9254", "innererror": { "code": "SyntaxError", "message": "Request is invalid and cannot be processed: Syntax error: SYN0001: I could not parse that, sorry. [line:position=0:0]. Query: \u0027let [\u0027emptyTable\u0027] = view () { datatable(column:string)[] };restrict access to (*);\r\nthis won\u0027t work\u0027" @@ -64,8 +65,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T10:20:12.7477711-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:11.5455286-07:00", "RandomSeed": "1611967510", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatchAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatchAsync.json index 7d69b7e93d8aa..8399a9945833c 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatchAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/LogsQueryClientClientLiveTests/ThrowsExceptionWhenQueryFailsBatchAsync.json @@ -6,10 +6,10 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "148", + "Content-Length": "194", "Content-Type": "application/json", - "traceparent": "00-391bd40a9f352b4eb52f821c87713f9e-974d2aad4351c141-00", - "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210422.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "traceparent": "00-b1d875aafbadfd4cafc81f0f96e3a1f1-2501fd0bc1cdac49-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "4a4399a7a5e3e1c433a64bc4556a6ce0", "x-ms-return-client-request-id": "true" }, @@ -18,11 +18,12 @@ { "id": "0", "body": { - "query": "this won\u0027t work" + "query": "this won\u0027t work", + "timespan": "2021-04-26T00:00:00.0000000Z/P7D" }, "path": "/query", "method": "POST", - "workspace": "9a15b791-8d2f-436f-a734-25d128c72254" + "workspace": "bb1b4371-062d-414d-bef3-b0d124ff721c" } ] }, @@ -32,14 +33,14 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 22 Apr 2021 17:23:13 GMT", + "Date": "Tue, 04 May 2021 18:37:25 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Transfer-Encoding": "chunked", "Vary": [ "Accept-Encoding", "Accept-Encoding" ], - "Via": "1.1 draft-oms-778c644d5b-fs9qc", + "Via": "1.1 draft-oms-6c84644dc4-p7t8p", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -51,7 +52,7 @@ "error": { "message": "The request had some invalid properties", "code": "BadArgumentError", - "correlationId": "b2c76f21-ecfd-4983-8a54-38a3a3378e58", + "correlationId": "3e9331a5-ffab-4bb6-94ef-1629707ae52e", "innererror": { "code": "SyntaxError", "message": "Request is invalid and cannot be processed: Syntax error: SYN0001: I could not parse that, sorry. [line:position=0:0]. Query: \u0027let [\u0027emptyTable\u0027] = view () { datatable(column:string)[] };restrict access to (*);\r\nthis won\u0027t work\u0027" @@ -64,8 +65,8 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-22T10:23:10.4570553-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:24.3584417-07:00", "RandomSeed": "1563703860", - "WORKSPACE_ID": "9a15b791-8d2f-436f-a734-25d128c72254" + "WORKSPACE_ID": "bb1b4371-062d-414d-bef3-b0d124ff721c" } } \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetrics.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetrics.json index e0d5f37dae105..640e05f6e0c71 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetrics.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetrics.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-3cb9fdf7c65a38448cd114d0f8aca640-df79b70acb6e184b-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-fca0549e05857744b5e70c94667e1e70-d0e7228c63caf340-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "41243e379d1e3f54b2b97fb33a3557ba", "x-ms-return-client-request-id": "true" }, @@ -21,17 +18,17 @@ "Cache-Control": "no-cache", "Content-Length": "86362", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:37 GMT", + "Date": "Tue, 04 May 2021 18:37:32 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "377c57df-d97b-4a26-94b1-70df907d4f1b", + "x-ms-correlation-request-id": "6c2dc8e4-9ca0-4584-a3be-bf2adc7739d3", "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "{377c57df-d97b-4a26-94b1-70df907d4f1b}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175137Z:377c57df-d97b-4a26-94b1-70df907d4f1b", + "x-ms-request-id": "{6c2dc8e4-9ca0-4584-a3be-bf2adc7739d3}", + "x-ms-routing-request-id": "WESTUS:20210504T183733Z:6c2dc8e4-9ca0-4584-a3be-bf2adc7739d3", "X-Powered-By": "ASP.NET" }, "ResponseBody": { @@ -4900,7 +4897,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:35.3947165-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:31.6236535-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "METRICS_RESOURCE_NAMESPACE": "Microsoft.OperationalInsights/workspaces", "RandomSeed": "275861639" diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetricsAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetricsAsync.json index efc60321b97cd..37ee22e8f5bc3 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetricsAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListMetricsAsync.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-59304eb8ff16184a9da0470eb654bf49-209b7a7bd031e842-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-83e2a7e0ef6618429102b33e1711f30c-a0c291683dc2394d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "a54e04d1a8d8ba5077a364b0e3d9dc6d", "x-ms-return-client-request-id": "true" }, @@ -21,17 +18,17 @@ "Cache-Control": "no-cache", "Content-Length": "86362", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:41 GMT", + "Date": "Tue, 04 May 2021 18:37:40 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e515235a-8904-4267-aee4-ff30e87e831e", + "x-ms-correlation-request-id": "364f317a-0e15-49d4-a11a-2b65fa72407a", "x-ms-ratelimit-remaining-subscription-reads": "11986", - "x-ms-request-id": "{e515235a-8904-4267-aee4-ff30e87e831e}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175141Z:e515235a-8904-4267-aee4-ff30e87e831e", + "x-ms-request-id": "{364f317a-0e15-49d4-a11a-2b65fa72407a}", + "x-ms-routing-request-id": "WESTUS:20210504T183740Z:364f317a-0e15-49d4-a11a-2b65fa72407a", "X-Powered-By": "ASP.NET" }, "ResponseBody": { @@ -4900,7 +4897,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:41.5245264-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:40.0769687-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "METRICS_RESOURCE_NAMESPACE": "Microsoft.OperationalInsights/workspaces", "RandomSeed": "411766157" diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetrics.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetrics.json index f0e2bb981e85e..6b999c0cf7876 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetrics.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetrics.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-f0a2a106e9a9094fac604733b03f59c6-cd86b1979334de47-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-1e852c6d48c09b44a9190de8b5cae917-f3530b462ad6d642-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "4fb1eb77a38c67838e28da618ae3afcd", "x-ms-return-client-request-id": "true" }, @@ -21,16 +18,16 @@ "Cache-Control": "no-cache", "Content-Length": "795", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 21:02:44 GMT", + "Date": "Tue, 04 May 2021 18:37:33 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2c27e3c2-ba3e-4921-8d5e-0e981fa7ceae", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "{2c27e3c2-ba3e-4921-8d5e-0e981fa7ceae}", - "x-ms-routing-request-id": "WESTUS:20210429T210245Z:2c27e3c2-ba3e-4921-8d5e-0e981fa7ceae", + "x-ms-correlation-request-id": "0a0a984e-729b-42bc-93c2-4512ae2d2acf", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "{0a0a984e-729b-42bc-93c2-4512ae2d2acf}", + "x-ms-routing-request-id": "WESTUS:20210504T183733Z:0a0a984e-729b-42bc-93c2-4512ae2d2acf", "X-Powered-By": "ASP.NET" }, "ResponseBody": { @@ -58,7 +55,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T14:02:43.8334094-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:33.3270653-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "573943417" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetricsAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetricsAsync.json index fdf0cceab58d9..d024c71124dd9 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetricsAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanListNamespacesMetricsAsync.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-b089ab70631b744fab83a7f7ad5581c5-007316496d54ce4a-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-25769809fb86fd44bfd7f9e50c5acd99-5b0af70c07de8048-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "8c8a93ce2d9a92f0bb494f5dcc2d2c0b", "x-ms-return-client-request-id": "true" }, @@ -21,16 +18,16 @@ "Cache-Control": "no-cache", "Content-Length": "795", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 21:03:07 GMT", + "Date": "Tue, 04 May 2021 18:37:41 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4d31e828-bc3f-4875-a4ba-de428b72abbe", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "{4d31e828-bc3f-4875-a4ba-de428b72abbe}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T210307Z:4d31e828-bc3f-4875-a4ba-de428b72abbe", + "x-ms-correlation-request-id": "a1fe0b10-ddcd-4f83-9072-f19741df7317", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "{a1fe0b10-ddcd-4f83-9072-f19741df7317}", + "x-ms-routing-request-id": "WESTUS:20210504T183741Z:a1fe0b10-ddcd-4f83-9072-f19741df7317", "X-Powered-By": "ASP.NET" }, "ResponseBody": { @@ -58,7 +55,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T14:03:06.3537249-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:40.7332802-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "986176634" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetrics.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetrics.json index 38285508d5602..7d313968a8d59 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetrics.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetrics.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2FPT3M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2FPT3M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-d15e0cc3ef02e34386fe9cfa7c1cfd22-e5b1e7138b1ec54d-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-d50605636fb55043bdfdd4e6e25f91c8-c42a214173490143-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "df7775edb4762b4c410ebe8367cd7956", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "693", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:38 GMT", + "Date": "Tue, 04 May 2021 18:37:34 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ab9b9e13-f3f2-4b9d-8faa-76c6154e8726", + "x-ms-correlation-request-id": "5d46a5c3-b06c-4c11-a0a9-0d0ff2f2ff22", "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-request-id": "{ab9b9e13-f3f2-4b9d-8faa-76c6154e8726}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175138Z:ab9b9e13-f3f2-4b9d-8faa-76c6154e8726", + "x-ms-request-id": "{5d46a5c3-b06c-4c11-a0a9-0d0ff2f2ff22}", + "x-ms-routing-request-id": "WESTUS:20210504T183734Z:5d46a5c3-b06c-4c11-a0a9-0d0ff2f2ff22", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 2, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:33:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:18:00Z", "interval": "PT1M", "value": [ { @@ -52,15 +49,15 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 } ] @@ -75,7 +72,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:37.9135980-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:33.7334729-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "2009786302" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregations.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregations.json index 96233d256b31f..25665f2e88a6c 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregations.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregations.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Average%2CCount%2CMaximum%2CMinimum%2CTotal\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Average%2CCount%2CMaximum%2CMinimum%2CTotal\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-f393e60bf765da4dbc87beced27e9c20-50432fbe7cd11146-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-c030dbb47cd7c146ae2d14ed3ba8ded9-49a0e573de1ac64c-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "95abd3fb2b747520e86feea0a3fe790c", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "2244", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:38 GMT", + "Date": "Tue, 04 May 2021 18:37:34 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "38500344-8a6c-43e7-86b5-9cf1b3b9f87c", + "x-ms-correlation-request-id": "7287bd28-12e0-48b5-9a85-5c252f442007", "x-ms-ratelimit-remaining-subscription-reads": "11994", - "x-ms-request-id": "{38500344-8a6c-43e7-86b5-9cf1b3b9f87c}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175138Z:38500344-8a6c-43e7-86b5-9cf1b3b9f87c", + "x-ms-request-id": "{7287bd28-12e0-48b5-9a85-5c252f442007}", + "x-ms-routing-request-id": "WESTUS:20210504T183735Z:7287bd28-12e0-48b5-9a85-5c252f442007", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 70, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,7 +49,7 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "total": 0.0, "count": 2.0, "average": 0.0, @@ -60,7 +57,7 @@ "maximum": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "total": 60.0, "count": 4.0, "average": 15.0, @@ -68,7 +65,7 @@ "maximum": 20.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "total": 120.0, "count": 6.0, "average": 20.0, @@ -76,7 +73,7 @@ "maximum": 40.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "total": 180.0, "count": 8.0, "average": 22.5, @@ -84,7 +81,7 @@ "maximum": 60.0 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "total": 240.0, "count": 10.0, "average": 24.0, @@ -92,7 +89,7 @@ "maximum": 80.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "total": 300.0, "count": 12.0, "average": 25.0, @@ -100,7 +97,7 @@ "maximum": 100.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "total": 360.0, "count": 14.0, "average": 25.714285714285715, @@ -108,7 +105,7 @@ "maximum": 120.0 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "total": 420.0, "count": 16.0, "average": 26.25, @@ -116,7 +113,7 @@ "maximum": 140.0 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "total": 480.0, "count": 18.0, "average": 26.666666666666668, @@ -124,7 +121,7 @@ "maximum": 160.0 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "total": 540.0, "count": 20.0, "average": 27.0, @@ -132,7 +129,7 @@ "maximum": 180.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "total": 600.0, "count": 22.0, "average": 27.272727272727273, @@ -140,7 +137,7 @@ "maximum": 200.0 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "total": 660.0, "count": 24.0, "average": 27.5, @@ -148,7 +145,7 @@ "maximum": 220.0 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "total": 720.0, "count": 26.0, "average": 27.692307692307693, @@ -156,7 +153,7 @@ "maximum": 240.0 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "total": 780.0, "count": 28.0, "average": 27.857142857142858, @@ -164,7 +161,7 @@ "maximum": 260.0 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "total": 840.0, "count": 30.0, "average": 28.0, @@ -183,7 +180,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:38.3109163-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:34.4987455-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "1667063643" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregationsAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregationsAsync.json index aef140e02082e..b741b05e9c081 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregationsAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAllAggregationsAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Average%2CCount%2CMaximum%2CMinimum%2CTotal\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Average%2CCount%2CMaximum%2CMinimum%2CTotal\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-832d027c6254b94a8b9c25c7d143551b-39073fd42db12849-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-ab8b96af862b9f4da7510d771bebefbb-134105a09a859048-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "877e3c6d15b4d0ea6daa9c60103c0714", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "2244", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:42 GMT", + "Date": "Tue, 04 May 2021 18:37:42 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "03748264-40bf-4f62-bf4c-e9f1758405bd", + "x-ms-correlation-request-id": "576b1432-5f87-4cac-be90-493cc6e23726", "x-ms-ratelimit-remaining-subscription-reads": "11983", - "x-ms-request-id": "{03748264-40bf-4f62-bf4c-e9f1758405bd}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175143Z:03748264-40bf-4f62-bf4c-e9f1758405bd", + "x-ms-request-id": "{576b1432-5f87-4cac-be90-493cc6e23726}", + "x-ms-routing-request-id": "WESTUS:20210504T183743Z:576b1432-5f87-4cac-be90-493cc6e23726", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 70, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,7 +49,7 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "total": 0.0, "count": 2.0, "average": 0.0, @@ -60,7 +57,7 @@ "maximum": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "total": 60.0, "count": 4.0, "average": 15.0, @@ -68,7 +65,7 @@ "maximum": 20.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "total": 120.0, "count": 6.0, "average": 20.0, @@ -76,7 +73,7 @@ "maximum": 40.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "total": 180.0, "count": 8.0, "average": 22.5, @@ -84,7 +81,7 @@ "maximum": 60.0 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "total": 240.0, "count": 10.0, "average": 24.0, @@ -92,7 +89,7 @@ "maximum": 80.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "total": 300.0, "count": 12.0, "average": 25.0, @@ -100,7 +97,7 @@ "maximum": 100.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "total": 360.0, "count": 14.0, "average": 25.714285714285715, @@ -108,7 +105,7 @@ "maximum": 120.0 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "total": 420.0, "count": 16.0, "average": 26.25, @@ -116,7 +113,7 @@ "maximum": 140.0 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "total": 480.0, "count": 18.0, "average": 26.666666666666668, @@ -124,7 +121,7 @@ "maximum": 160.0 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "total": 540.0, "count": 20.0, "average": 27.0, @@ -132,7 +129,7 @@ "maximum": 180.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "total": 600.0, "count": 22.0, "average": 27.272727272727273, @@ -140,7 +137,7 @@ "maximum": 200.0 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "total": 660.0, "count": 24.0, "average": 27.5, @@ -148,7 +145,7 @@ "maximum": 220.0 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "total": 720.0, "count": 26.0, "average": 27.692307692307693, @@ -156,7 +153,7 @@ "maximum": 240.0 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "total": 780.0, "count": 28.0, "average": 27.857142857142858, @@ -164,7 +161,7 @@ "maximum": 260.0 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "total": 840.0, "count": 30.0, "average": 28.0, @@ -183,7 +180,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:42.8750903-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:42.3582129-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "1565110545" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAsync.json index d223b4bab3cae..7ace49c466af4 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2FPT3M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2FPT3M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-b4527c321e343147b3627f05da2a768f-31f95ce847dacd49-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-feb95ff0f74c264888eaea3457f28127-f35450ef02add145-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "968e4c18a8b1cca002fb55beba6ac202", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "693", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:42 GMT", + "Date": "Tue, 04 May 2021 18:37:42 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d413b37f-3247-4552-9258-a4ecfc0f0fbc", + "x-ms-correlation-request-id": "2fe82687-92cc-4537-81bd-045735b36525", "x-ms-ratelimit-remaining-subscription-reads": "11984", - "x-ms-request-id": "{d413b37f-3247-4552-9258-a4ecfc0f0fbc}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175142Z:d413b37f-3247-4552-9258-a4ecfc0f0fbc", + "x-ms-request-id": "{2fe82687-92cc-4537-81bd-045735b36525}", + "x-ms-routing-request-id": "WESTUS:20210504T183742Z:2fe82687-92cc-4537-81bd-045735b36525", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 2, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:33:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:18:00Z", "interval": "PT1M", "value": [ { @@ -52,15 +49,15 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 } ] @@ -75,7 +72,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:42.4822823-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:41.5145525-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "297588951" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEnd.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEnd.json index 9bbe5266b8c80..bd3f465c2dcd7 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEnd.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEnd.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=PT15M%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=PT15M%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-e316ad4b26f67542b73d335e795db4fb-fa150a16a5fe8c44-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-99d6819c650fa540b4d1d049c2010ec3-3e2a2253f0213b40-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "e9c0a8196b8022ba5a6f6337b9aac1e8", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1389", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:38 GMT", + "Date": "Tue, 04 May 2021 18:37:35 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e149c579-8bbc-49ce-836a-a7ff1bc3d98d", + "x-ms-correlation-request-id": "23ec53a1-e9f0-4864-b107-8ff30a56d6e4", "x-ms-ratelimit-remaining-subscription-reads": "11993", - "x-ms-request-id": "{e149c579-8bbc-49ce-836a-a7ff1bc3d98d}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175139Z:e149c579-8bbc-49ce-836a-a7ff1bc3d98d", + "x-ms-request-id": "{23ec53a1-e9f0-4864-b107-8ff30a56d6e4}", + "x-ms-routing-request-id": "WESTUS:20210504T183735Z:23ec53a1-e9f0-4864-b107-8ff30a56d6e4", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,63 +49,63 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 } ] @@ -123,7 +120,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:38.7018824-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:35.2956383-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "250799635" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEndAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEndAsync.json index ef225ec10a738..a506121e05fc4 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEndAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsDurationEndAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=PT15M%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=PT15M%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-7469f5cc94effe4485c2399faff1c822-04b29c1b033c6b40-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-59a9c89913b9354db315d2f233fc2f52-a442e4eb9cbf424b-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "dee5f8cf1f1bb0c25656d34cb80bd355", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1389", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:43 GMT", + "Date": "Tue, 04 May 2021 18:37:43 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5953a1a5-c6ba-466d-b653-63ddbfbf3b37", + "x-ms-correlation-request-id": "e433afb3-b9ef-4205-8a39-5b05bff535de", "x-ms-ratelimit-remaining-subscription-reads": "11982", - "x-ms-request-id": "{5953a1a5-c6ba-466d-b653-63ddbfbf3b37}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175143Z:5953a1a5-c6ba-466d-b653-63ddbfbf3b37", + "x-ms-request-id": "{e433afb3-b9ef-4205-8a39-5b05bff535de}", + "x-ms-routing-request-id": "WESTUS:20210504T183743Z:e433afb3-b9ef-4205-8a39-5b05bff535de", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,63 +49,63 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 } ] @@ -123,7 +120,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:43.2738139-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:43.1082292-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "695706998" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilter.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilter.json index 4f940a98bfa70..4494d12270899 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilter.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilter.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026$filter=Name%20eq%20%27Guinness%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026$filter=Name%20eq%20%27Guinness%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-80841e7c3e6ca3479b0a4ec3d4950296-3cf5e61aa468c949-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-887175f651220a41932605fec61ab96c-159e45dd435ef041-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "75d7dd742cfed6d4cd4d410008450756", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1348", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:39 GMT", + "Date": "Tue, 04 May 2021 18:37:36 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "416e91a6-e380-46cf-bf2e-d670624699d8", + "x-ms-correlation-request-id": "948becbd-d5ed-4c1d-ba30-dbbc3d450338", "x-ms-ratelimit-remaining-subscription-reads": "11992", - "x-ms-request-id": "{416e91a6-e380-46cf-bf2e-d670624699d8}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175139Z:416e91a6-e380-46cf-bf2e-d670624699d8", + "x-ms-request-id": "{948becbd-d5ed-4c1d-ba30-dbbc3d450338}", + "x-ms-routing-request-id": "WESTUS:20210504T183736Z:948becbd-d5ed-4c1d-ba30-dbbc3d450338", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -60,63 +57,63 @@ ], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "count": 1.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "count": 2.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "count": 3.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "count": 4.0 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "count": 5.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "count": 6.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "count": 7.0 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "count": 8.0 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "count": 9.0 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "count": 10.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "count": 11.0 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "count": 12.0 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "count": 13.0 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "count": 14.0 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "count": 15.0 } ] @@ -131,7 +128,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:39.1473774-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:35.9680769-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "257531409" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterAsync.json index 424922530c2bb..37f3b20a1618c 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026$filter=Name%20eq%20%27Guinness%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026$filter=Name%20eq%20%27Guinness%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-9ac537d4388df544afcc053253e09e1d-11e3a8a133dacd42-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-363321bd9a7c4e42be66e7c3610c30b7-3e1506034b1b7847-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "b987511b525c8fa07ea6d4525d17c5e4", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1348", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:44 GMT", + "Date": "Tue, 04 May 2021 18:37:44 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "36ffdd54-0800-44d4-ac07-7d8bc886280f", + "x-ms-correlation-request-id": "8d56d2b4-46e9-4aae-9392-8f44f8db299c", "x-ms-ratelimit-remaining-subscription-reads": "11981", - "x-ms-request-id": "{36ffdd54-0800-44d4-ac07-7d8bc886280f}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175144Z:36ffdd54-0800-44d4-ac07-7d8bc886280f", + "x-ms-request-id": "{8d56d2b4-46e9-4aae-9392-8f44f8db299c}", + "x-ms-routing-request-id": "WESTUS:20210504T183744Z:8d56d2b4-46e9-4aae-9392-8f44f8db299c", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -60,63 +57,63 @@ ], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "count": 1.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "count": 2.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "count": 3.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "count": 4.0 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "count": 5.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "count": 6.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "count": 7.0 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "count": 8.0 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "count": 9.0 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "count": 10.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "count": 11.0 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "count": 12.0 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "count": 13.0 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "count": 14.0 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "count": 15.0 } ] @@ -131,7 +128,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:43.9337871-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:43.6082964-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "522051195" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTop.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTop.json index df3a4bcb20e28..782f420a917b0 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTop.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTop.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026top=1\u0026$filter=Name%20eq%20%27%2A%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026top=1\u0026$filter=Name%20eq%20%27%2A%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-d59930e0bba4bd46a45ba0757c83bbcc-608e2b8f89d4524a-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-55be202e75d5724796f4c310682b80df-b553d5f423e7be4d-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "26de771c87437a6dd0374cfdac966cc3", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1346", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:39 GMT", + "Date": "Tue, 04 May 2021 18:37:37 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7db07f3c-bc78-4a87-945a-230fd1b6bcb3", + "x-ms-correlation-request-id": "338343b9-1a2c-4d58-bf6e-91787e66a23c", "x-ms-ratelimit-remaining-subscription-reads": "11991", - "x-ms-request-id": "{7db07f3c-bc78-4a87-945a-230fd1b6bcb3}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175139Z:7db07f3c-bc78-4a87-945a-230fd1b6bcb3", + "x-ms-request-id": "{338343b9-1a2c-4d58-bf6e-91787e66a23c}", + "x-ms-routing-request-id": "WESTUS:20210504T183737Z:338343b9-1a2c-4d58-bf6e-91787e66a23c", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -60,63 +57,63 @@ ], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "count": 1.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "count": 2.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "count": 3.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "count": 4.0 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "count": 5.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "count": 6.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "count": 7.0 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "count": 8.0 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "count": 9.0 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "count": 10.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "count": 11.0 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "count": 12.0 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "count": 13.0 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "count": 14.0 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "count": 15.0 } ] @@ -131,7 +128,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:39.5949652-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:36.8111393-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "425851262" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTopAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTopAsync.json index 737de77d0fd3a..99fca92182559 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTopAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsFilterTopAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026top=1\u0026$filter=Name%20eq%20%27%2A%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026aggregation=Count\u0026top=1\u0026$filter=Name%20eq%20%27%2A%27\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-6a6810e7ef6dbd4bacb59c9177ecac3c-8aaf31856e687541-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-f4a962066eeff74497391cb78abe535d-5aa62df5299bfe44-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "f112cb5d01e9385d88066b9ced42c28f", "x-ms-return-client-request-id": "true" }, @@ -19,24 +16,24 @@ "ResponseHeaders": { "Access-Control-Expose-Headers": "Request-Context", "Cache-Control": "no-cache", - "Content-Length": "1348", + "Content-Length": "1346", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:44 GMT", + "Date": "Tue, 04 May 2021 18:37:44 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "80c2ee3a-d863-42fe-94aa-d42bacfc4e01", + "x-ms-correlation-request-id": "bcf25bae-d94b-4f67-8f1a-273d302129f7", "x-ms-ratelimit-remaining-subscription-reads": "11980", - "x-ms-request-id": "{80c2ee3a-d863-42fe-94aa-d42bacfc4e01}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175144Z:80c2ee3a-d863-42fe-94aa-d42bacfc4e01", + "x-ms-request-id": "{bcf25bae-d94b-4f67-8f1a-273d302129f7}", + "x-ms-routing-request-id": "WESTUS:20210504T183745Z:bcf25bae-d94b-4f67-8f1a-273d302129f7", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -55,68 +52,68 @@ "value": "name", "localizedValue": "name" }, - "value": "Guinness" + "value": "Bessie" } ], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "count": 1.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "count": 2.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "count": 3.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "count": 4.0 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "count": 5.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "count": 6.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "count": 7.0 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "count": 8.0 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "count": 9.0 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "count": 10.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "count": 11.0 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "count": 12.0 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "count": 13.0 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "count": 14.0 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "count": 15.0 } ] @@ -131,7 +128,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:44.3719785-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:44.3736342-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "2081104436" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespan.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespan.json index 32737991a3479..acb9f215c65f9 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespan.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespan.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-b145b944e8a0c5478049e2e2d86f6546-3a3bffcb70439f42-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-e4874081987cbb4a85f1a213ce827c9f-29ecbf645871d142-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "8080fbbb518c723d9bf13487c940ebcc", "x-ms-return-client-request-id": "true" }, @@ -19,24 +16,24 @@ "ResponseHeaders": { "Access-Control-Expose-Headers": "Request-Context", "Cache-Control": "no-cache", - "Content-Length": "3054", + "Content-Length": "3570", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:40 GMT", + "Date": "Tue, 04 May 2021 18:37:38 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1a9ba0c9-e99c-40e7-92e6-d264855aa1f1", + "x-ms-correlation-request-id": "3936f391-1cb6-4775-a57f-b9f40db06364", "x-ms-ratelimit-remaining-subscription-reads": "11990", - "x-ms-request-id": "{1a9ba0c9-e99c-40e7-92e6-d264855aa1f1}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175140Z:1a9ba0c9-e99c-40e7-92e6-d264855aa1f1", + "x-ms-request-id": "{3936f391-1cb6-4775-a57f-b9f40db06364}", + "x-ms-routing-request-id": "WESTUS:20210504T183738Z:3936f391-1cb6-4775-a57f-b9f40db06364", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 59, - "timespan": "2021-04-29T16:51:40Z/2021-04-29T17:51:40Z", + "timespan": "2021-05-04T17:37:38Z/2021-05-04T18:37:38Z", "interval": "PT1M", "value": [ { @@ -52,199 +49,224 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T16:51:00Z" - }, - { - "timeStamp": "2021-04-29T16:52:00Z" + "timeStamp": "2021-05-04T17:37:00Z" }, { - "timeStamp": "2021-04-29T16:53:00Z" + "timeStamp": "2021-05-04T17:38:00Z" }, { - "timeStamp": "2021-04-29T16:54:00Z" + "timeStamp": "2021-05-04T17:39:00Z" }, { - "timeStamp": "2021-04-29T16:55:00Z" + "timeStamp": "2021-05-04T17:40:00Z" }, { - "timeStamp": "2021-04-29T16:56:00Z" + "timeStamp": "2021-05-04T17:41:00Z" }, { - "timeStamp": "2021-04-29T16:57:00Z" + "timeStamp": "2021-05-04T17:42:00Z" }, { - "timeStamp": "2021-04-29T16:58:00Z" + "timeStamp": "2021-05-04T17:43:00Z" }, { - "timeStamp": "2021-04-29T16:59:00Z" + "timeStamp": "2021-05-04T17:44:00Z" }, { - "timeStamp": "2021-04-29T17:00:00Z" + "timeStamp": "2021-05-04T17:45:00Z" }, { - "timeStamp": "2021-04-29T17:01:00Z" + "timeStamp": "2021-05-04T17:46:00Z" }, { - "timeStamp": "2021-04-29T17:02:00Z" + "timeStamp": "2021-05-04T17:47:00Z" }, { - "timeStamp": "2021-04-29T17:03:00Z" + "timeStamp": "2021-05-04T17:48:00Z" }, { - "timeStamp": "2021-04-29T17:04:00Z" + "timeStamp": "2021-05-04T17:49:00Z" }, { - "timeStamp": "2021-04-29T17:05:00Z" + "timeStamp": "2021-05-04T17:50:00Z", + "average": 25.0 }, { - "timeStamp": "2021-04-29T17:06:00Z" + "timeStamp": "2021-05-04T17:51:00Z", + "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:07:00Z" + "timeStamp": "2021-05-04T17:52:00Z", + "average": 26.25 }, { - "timeStamp": "2021-04-29T17:08:00Z" + "timeStamp": "2021-05-04T17:53:00Z", + "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:09:00Z" + "timeStamp": "2021-05-04T17:54:00Z", + "average": 27.0 }, { - "timeStamp": "2021-04-29T17:10:00Z" + "timeStamp": "2021-05-04T17:55:00Z", + "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:11:00Z" + "timeStamp": "2021-05-04T17:56:00Z", + "average": 27.5 }, { - "timeStamp": "2021-04-29T17:12:00Z" + "timeStamp": "2021-05-04T17:57:00Z", + "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:13:00Z" + "timeStamp": "2021-05-04T17:58:00Z", + "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:14:00Z" + "timeStamp": "2021-05-04T17:59:00Z", + "average": 28.0 }, { - "timeStamp": "2021-04-29T17:15:00Z" + "timeStamp": "2021-05-04T18:00:00Z", + "average": 0.0 }, { - "timeStamp": "2021-04-29T17:16:00Z" + "timeStamp": "2021-05-04T18:01:00Z", + "average": 15.0 }, { - "timeStamp": "2021-04-29T17:17:00Z" + "timeStamp": "2021-05-04T18:02:00Z", + "average": 20.0 }, { - "timeStamp": "2021-04-29T17:18:00Z" + "timeStamp": "2021-05-04T18:03:00Z", + "average": 22.5 }, { - "timeStamp": "2021-04-29T17:19:00Z" + "timeStamp": "2021-05-04T18:04:00Z", + "average": 24.0 }, { - "timeStamp": "2021-04-29T17:20:00Z" + "timeStamp": "2021-05-04T18:05:00Z", + "average": 25.0 }, { - "timeStamp": "2021-04-29T17:21:00Z" + "timeStamp": "2021-05-04T18:06:00Z", + "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:22:00Z" + "timeStamp": "2021-05-04T18:07:00Z", + "average": 26.25 }, { - "timeStamp": "2021-04-29T17:23:00Z" + "timeStamp": "2021-05-04T18:08:00Z", + "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:24:00Z" + "timeStamp": "2021-05-04T18:09:00Z", + "average": 27.0 }, { - "timeStamp": "2021-04-29T17:25:00Z" + "timeStamp": "2021-05-04T18:10:00Z", + "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:26:00Z" + "timeStamp": "2021-05-04T18:11:00Z", + "average": 27.5 }, { - "timeStamp": "2021-04-29T17:27:00Z" + "timeStamp": "2021-05-04T18:12:00Z", + "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:28:00Z" + "timeStamp": "2021-05-04T18:13:00Z", + "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:29:00Z" + "timeStamp": "2021-05-04T18:14:00Z", + "average": 28.0 }, { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 }, { - "timeStamp": "2021-04-29T17:45:00Z" + "timeStamp": "2021-05-04T18:30:00Z" + }, + { + "timeStamp": "2021-05-04T18:31:00Z" }, { - "timeStamp": "2021-04-29T17:46:00Z" + "timeStamp": "2021-05-04T18:32:00Z" }, { - "timeStamp": "2021-04-29T17:47:00Z" + "timeStamp": "2021-05-04T18:33:00Z" }, { - "timeStamp": "2021-04-29T17:48:00Z" + "timeStamp": "2021-05-04T18:34:00Z" }, { - "timeStamp": "2021-04-29T17:49:00Z" + "timeStamp": "2021-05-04T18:35:00Z" }, { - "timeStamp": "2021-04-29T17:50:00Z" + "timeStamp": "2021-05-04T18:36:00Z" } ] } @@ -258,7 +280,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:39.9423217-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:37.5613689-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "368288103" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespanAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespanAsync.json index cb61d148bfb12..88ed68919a1b2 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespanAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsNoTimespanAsync.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-bdc36dcaa6f1d849ae370cc194153488-c54d907c79556b47-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-3f47d2dfb5a5a54a89d3c2923e085015-ee403cb834514245-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "42a622b4f470def4af7f49793cdb7d5a", "x-ms-return-client-request-id": "true" }, @@ -19,24 +16,24 @@ "ResponseHeaders": { "Access-Control-Expose-Headers": "Request-Context", "Cache-Control": "no-cache", - "Content-Length": "3054", + "Content-Length": "3570", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:44 GMT", + "Date": "Tue, 04 May 2021 18:37:45 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2cc24fa4-035d-4bc1-a6f1-96f58d458428", + "x-ms-correlation-request-id": "346b503e-d579-4d9a-be60-dde30eb42695", "x-ms-ratelimit-remaining-subscription-reads": "11979", - "x-ms-request-id": "{2cc24fa4-035d-4bc1-a6f1-96f58d458428}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175145Z:2cc24fa4-035d-4bc1-a6f1-96f58d458428", + "x-ms-request-id": "{346b503e-d579-4d9a-be60-dde30eb42695}", + "x-ms-routing-request-id": "WESTUS:20210504T183745Z:346b503e-d579-4d9a-be60-dde30eb42695", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 59, - "timespan": "2021-04-29T16:51:45Z/2021-04-29T17:51:45Z", + "timespan": "2021-05-04T17:37:45Z/2021-05-04T18:37:45Z", "interval": "PT1M", "value": [ { @@ -52,199 +49,224 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T16:51:00Z" - }, - { - "timeStamp": "2021-04-29T16:52:00Z" + "timeStamp": "2021-05-04T17:37:00Z" }, { - "timeStamp": "2021-04-29T16:53:00Z" + "timeStamp": "2021-05-04T17:38:00Z" }, { - "timeStamp": "2021-04-29T16:54:00Z" + "timeStamp": "2021-05-04T17:39:00Z" }, { - "timeStamp": "2021-04-29T16:55:00Z" + "timeStamp": "2021-05-04T17:40:00Z" }, { - "timeStamp": "2021-04-29T16:56:00Z" + "timeStamp": "2021-05-04T17:41:00Z" }, { - "timeStamp": "2021-04-29T16:57:00Z" + "timeStamp": "2021-05-04T17:42:00Z" }, { - "timeStamp": "2021-04-29T16:58:00Z" + "timeStamp": "2021-05-04T17:43:00Z" }, { - "timeStamp": "2021-04-29T16:59:00Z" + "timeStamp": "2021-05-04T17:44:00Z" }, { - "timeStamp": "2021-04-29T17:00:00Z" + "timeStamp": "2021-05-04T17:45:00Z" }, { - "timeStamp": "2021-04-29T17:01:00Z" + "timeStamp": "2021-05-04T17:46:00Z" }, { - "timeStamp": "2021-04-29T17:02:00Z" + "timeStamp": "2021-05-04T17:47:00Z" }, { - "timeStamp": "2021-04-29T17:03:00Z" + "timeStamp": "2021-05-04T17:48:00Z" }, { - "timeStamp": "2021-04-29T17:04:00Z" + "timeStamp": "2021-05-04T17:49:00Z" }, { - "timeStamp": "2021-04-29T17:05:00Z" + "timeStamp": "2021-05-04T17:50:00Z", + "average": 25.0 }, { - "timeStamp": "2021-04-29T17:06:00Z" + "timeStamp": "2021-05-04T17:51:00Z", + "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:07:00Z" + "timeStamp": "2021-05-04T17:52:00Z", + "average": 26.25 }, { - "timeStamp": "2021-04-29T17:08:00Z" + "timeStamp": "2021-05-04T17:53:00Z", + "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:09:00Z" + "timeStamp": "2021-05-04T17:54:00Z", + "average": 27.0 }, { - "timeStamp": "2021-04-29T17:10:00Z" + "timeStamp": "2021-05-04T17:55:00Z", + "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:11:00Z" + "timeStamp": "2021-05-04T17:56:00Z", + "average": 27.5 }, { - "timeStamp": "2021-04-29T17:12:00Z" + "timeStamp": "2021-05-04T17:57:00Z", + "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:13:00Z" + "timeStamp": "2021-05-04T17:58:00Z", + "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:14:00Z" + "timeStamp": "2021-05-04T17:59:00Z", + "average": 28.0 }, { - "timeStamp": "2021-04-29T17:15:00Z" + "timeStamp": "2021-05-04T18:00:00Z", + "average": 0.0 }, { - "timeStamp": "2021-04-29T17:16:00Z" + "timeStamp": "2021-05-04T18:01:00Z", + "average": 15.0 }, { - "timeStamp": "2021-04-29T17:17:00Z" + "timeStamp": "2021-05-04T18:02:00Z", + "average": 20.0 }, { - "timeStamp": "2021-04-29T17:18:00Z" + "timeStamp": "2021-05-04T18:03:00Z", + "average": 22.5 }, { - "timeStamp": "2021-04-29T17:19:00Z" + "timeStamp": "2021-05-04T18:04:00Z", + "average": 24.0 }, { - "timeStamp": "2021-04-29T17:20:00Z" + "timeStamp": "2021-05-04T18:05:00Z", + "average": 25.0 }, { - "timeStamp": "2021-04-29T17:21:00Z" + "timeStamp": "2021-05-04T18:06:00Z", + "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:22:00Z" + "timeStamp": "2021-05-04T18:07:00Z", + "average": 26.25 }, { - "timeStamp": "2021-04-29T17:23:00Z" + "timeStamp": "2021-05-04T18:08:00Z", + "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:24:00Z" + "timeStamp": "2021-05-04T18:09:00Z", + "average": 27.0 }, { - "timeStamp": "2021-04-29T17:25:00Z" + "timeStamp": "2021-05-04T18:10:00Z", + "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:26:00Z" + "timeStamp": "2021-05-04T18:11:00Z", + "average": 27.5 }, { - "timeStamp": "2021-04-29T17:27:00Z" + "timeStamp": "2021-05-04T18:12:00Z", + "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:28:00Z" + "timeStamp": "2021-05-04T18:13:00Z", + "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:29:00Z" + "timeStamp": "2021-05-04T18:14:00Z", + "average": 28.0 }, { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 }, { - "timeStamp": "2021-04-29T17:45:00Z" + "timeStamp": "2021-05-04T18:30:00Z" + }, + { + "timeStamp": "2021-05-04T18:31:00Z" }, { - "timeStamp": "2021-04-29T17:46:00Z" + "timeStamp": "2021-05-04T18:32:00Z" }, { - "timeStamp": "2021-04-29T17:47:00Z" + "timeStamp": "2021-05-04T18:33:00Z" }, { - "timeStamp": "2021-04-29T17:48:00Z" + "timeStamp": "2021-05-04T18:34:00Z" }, { - "timeStamp": "2021-04-29T17:49:00Z" + "timeStamp": "2021-05-04T18:35:00Z" }, { - "timeStamp": "2021-04-29T17:50:00Z" + "timeStamp": "2021-05-04T18:36:00Z" } ] } @@ -258,7 +280,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:44.8626633-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:45.1706416-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "704147427" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDuration.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDuration.json index 1d61f342a1a64..4bfb492f56aee 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDuration.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDuration.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2FPT15M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2FPT15M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-4816fa7fc44ce842915492142db786b1-ac7860249b514b4c-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-f97b468fdbe77449b78b213ea23c897b-95072791843efe4c-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "6c4a9520e26b3dd9a00c2abdd2eeabb0", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1389", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:40 GMT", + "Date": "Tue, 04 May 2021 18:37:38 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8bacdf1e-d631-4994-9b75-089f8a90879d", + "x-ms-correlation-request-id": "580f849a-71be-4553-9c95-365948cd9cd7", "x-ms-ratelimit-remaining-subscription-reads": "11989", - "x-ms-request-id": "{8bacdf1e-d631-4994-9b75-089f8a90879d}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175140Z:8bacdf1e-d631-4994-9b75-089f8a90879d", + "x-ms-request-id": "{580f849a-71be-4553-9c95-365948cd9cd7}", + "x-ms-routing-request-id": "WESTUS:20210504T183739Z:580f849a-71be-4553-9c95-365948cd9cd7", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,63 +49,63 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 } ] @@ -123,7 +120,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:40.3207089-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:38.3426171-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "639448888" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDurationAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDurationAsync.json index bcdfcd08014d0..f454f454ad20f 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDurationAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartDurationAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2FPT15M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2FPT15M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-8a02b2d3dad80f4f87f48fa01ea285c5-1e543e893f57c542-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-9ac2aa56468a9e41b08812c2348e1d59-cc3a80593ffbb943-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "85202cc2d4aad3d4b87d41f9f91b5519", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1389", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:44 GMT", + "Date": "Tue, 04 May 2021 18:37:46 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "054800a3-5297-4c2b-a866-f6efead0f8bb", + "x-ms-correlation-request-id": "3a7f6ec2-11ea-4736-adbe-275b9325cecc", "x-ms-ratelimit-remaining-subscription-reads": "11978", - "x-ms-request-id": "{054800a3-5297-4c2b-a866-f6efead0f8bb}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175145Z:054800a3-5297-4c2b-a866-f6efead0f8bb", + "x-ms-request-id": "{3a7f6ec2-11ea-4736-adbe-275b9325cecc}", + "x-ms-routing-request-id": "WESTUS:20210504T183746Z:3a7f6ec2-11ea-4736-adbe-275b9325cecc", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,63 +49,63 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 } ] @@ -123,7 +120,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:45.0856792-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:45.9207235-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "1786549677" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEnd.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEnd.json index a3da62860899f..67f27740c51d2 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEnd.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEnd.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-399ac99cfc55944e8061b9aa25018ad5-07e392bbb5147045-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-6ed537bb5e68aa4fba6bf2990c51685b-1823a7515d19b74e-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "794b106904f4453aa1f23c37709a06a6", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1389", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:40 GMT", + "Date": "Tue, 04 May 2021 18:37:39 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f7194e1d-7d68-4254-8d69-005e0fa16389", + "x-ms-correlation-request-id": "9fa2ab32-069c-4c6b-8733-30aaaab43d47", "x-ms-ratelimit-remaining-subscription-reads": "11988", - "x-ms-request-id": "{f7194e1d-7d68-4254-8d69-005e0fa16389}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175141Z:f7194e1d-7d68-4254-8d69-005e0fa16389", + "x-ms-request-id": "{9fa2ab32-069c-4c6b-8733-30aaaab43d47}", + "x-ms-routing-request-id": "WESTUS:20210504T183739Z:9fa2ab32-069c-4c6b-8733-30aaaab43d47", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,63 +49,63 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 } ] @@ -123,7 +120,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:40.7065313-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:39.2174659-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "1747723474" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndAsync.json index 674f86d2db8d0..f0c15d37b29f3 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-b264e08a67926b4b98f7d4d646941eec-7bc0ad9c6422a048-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-272aeaf5ecef2e40ae0694eb6dc11737-29bae247f1d50042-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "456237f6721c72a7dc31eb4129cdd3ff", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "1389", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:45 GMT", + "Date": "Tue, 04 May 2021 18:37:46 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4a165e87-8a79-48e0-af17-aeda2c97b92e", + "x-ms-correlation-request-id": "e69ae270-7132-4006-a031-2bd78b726287", "x-ms-ratelimit-remaining-subscription-reads": "11977", - "x-ms-request-id": "{4a165e87-8a79-48e0-af17-aeda2c97b92e}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175145Z:4a165e87-8a79-48e0-af17-aeda2c97b92e", + "x-ms-request-id": "{e69ae270-7132-4006-a031-2bd78b726287}", + "x-ms-routing-request-id": "WESTUS:20210504T183747Z:e69ae270-7132-4006-a031-2bd78b726287", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT1M", "value": [ { @@ -52,63 +49,63 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 0.0 }, { - "timeStamp": "2021-04-29T17:31:00Z", + "timeStamp": "2021-05-04T18:16:00Z", "average": 15.0 }, { - "timeStamp": "2021-04-29T17:32:00Z", + "timeStamp": "2021-05-04T18:17:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:33:00Z", + "timeStamp": "2021-05-04T18:18:00Z", "average": 22.5 }, { - "timeStamp": "2021-04-29T17:34:00Z", + "timeStamp": "2021-05-04T18:19:00Z", "average": 24.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 25.0 }, { - "timeStamp": "2021-04-29T17:36:00Z", + "timeStamp": "2021-05-04T18:21:00Z", "average": 25.714285714285715 }, { - "timeStamp": "2021-04-29T17:37:00Z", + "timeStamp": "2021-05-04T18:22:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:38:00Z", + "timeStamp": "2021-05-04T18:23:00Z", "average": 26.666666666666668 }, { - "timeStamp": "2021-04-29T17:39:00Z", + "timeStamp": "2021-05-04T18:24:00Z", "average": 27.0 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.272727272727273 }, { - "timeStamp": "2021-04-29T17:41:00Z", + "timeStamp": "2021-05-04T18:26:00Z", "average": 27.5 }, { - "timeStamp": "2021-04-29T17:42:00Z", + "timeStamp": "2021-05-04T18:27:00Z", "average": 27.692307692307693 }, { - "timeStamp": "2021-04-29T17:43:00Z", + "timeStamp": "2021-05-04T18:28:00Z", "average": 27.857142857142858 }, { - "timeStamp": "2021-04-29T17:44:00Z", + "timeStamp": "2021-05-04T18:29:00Z", "average": 28.0 } ] @@ -123,7 +120,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:45.2823366-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:46.7955437-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "701301593" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndInterval.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndInterval.json index 90945dbe95d7c..ac820a0cb9871 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndInterval.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndInterval.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026interval=PT5M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026interval=PT5M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-8e6f3dae03e33c4bba8457846a03b5d5-997740700b14d044-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-f4a3638c7468b646a54654abe53f34ae-e6e0c59e8d4bca4c-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "9c2d9515df8c6a2f67c2f73b6a928f26", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "710", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:41 GMT", + "Date": "Tue, 04 May 2021 18:37:39 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ba401411-3371-4e9c-9dfd-7b862f91e1f8", + "x-ms-correlation-request-id": "a9bd141e-f71a-49ee-98a5-9bcd274686a0", "x-ms-ratelimit-remaining-subscription-reads": "11987", - "x-ms-request-id": "{ba401411-3371-4e9c-9dfd-7b862f91e1f8}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175141Z:ba401411-3371-4e9c-9dfd-7b862f91e1f8", + "x-ms-request-id": "{a9bd141e-f71a-49ee-98a5-9bcd274686a0}", + "x-ms-routing-request-id": "WESTUS:20210504T183740Z:a9bd141e-f71a-49ee-98a5-9bcd274686a0", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT5M", "value": [ { @@ -52,15 +49,15 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.692307692307693 } ] @@ -75,7 +72,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:41.0861353-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:39.5925911-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "707005817" } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndIntervalAsync.json b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndIntervalAsync.json index d35278c16912d..670d193b6f1d9 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndIntervalAsync.json +++ b/sdk/monitor/Azure.Monitor.Query/tests/SessionRecords/MetricsQueryClientLiveTests/CanQueryMetricsStartEndIntervalAsync.json @@ -1,16 +1,13 @@ { "Entries": [ { - "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-04-29T17%3A30%3A00.0000000Z%2F2021-04-29T17%3A45%3A00.0000000Z\u0026interval=PT5M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", + "RequestUri": "https://management.azure.com/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs/providers/microsoft.insights/metrics?timespan=2021-05-04T18%3A15%3A00.0000000Z%2F2021-05-04T18%3A30%3A00.0000000Z\u0026interval=PT5M\u0026metricnames=CowsHappiness\u0026api-version=2018-01-01\u0026metricnamespace=Cows", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-0e02c59880c6894eb5f1d67b203a3cf2-8f050856e18d5549-00", - "User-Agent": [ - "azsdk-net-Monitor.Query/1.0.0-alpha.20210429.1", - "(.NET 5.0.5; Microsoft Windows 10.0.19042)" - ], + "traceparent": "00-c519a61689c19c45b8169fc15a971ce1-5d5c371edd34d34a-00", + "User-Agent": "azsdk-net-Monitor.Query/1.0.0-alpha.20210504.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", "x-ms-client-request-id": "b65f7f4c2ef13df434e9e8d4419f3d1f", "x-ms-return-client-request-id": "true" }, @@ -21,22 +18,22 @@ "Cache-Control": "no-cache", "Content-Length": "710", "Content-Type": "application/json", - "Date": "Thu, 29 Apr 2021 17:51:45 GMT", + "Date": "Tue, 04 May 2021 18:37:47 GMT", "Request-Context": "appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822", "Server": "Microsoft-IIS/10.0", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "Vary": "Accept-Encoding", "X-AspNet-Version": "4.0.30319", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "edaa148c-9831-4cf9-bea1-afe86266d38a", + "x-ms-correlation-request-id": "15646d36-0d38-4526-ba46-a43ad922ccbd", "x-ms-ratelimit-remaining-subscription-reads": "11976", - "x-ms-request-id": "{edaa148c-9831-4cf9-bea1-afe86266d38a}", - "x-ms-routing-request-id": "WESTCENTRALUS:20210429T175145Z:edaa148c-9831-4cf9-bea1-afe86266d38a", + "x-ms-request-id": "{15646d36-0d38-4526-ba46-a43ad922ccbd}", + "x-ms-routing-request-id": "WESTUS:20210504T183747Z:15646d36-0d38-4526-ba46-a43ad922ccbd", "X-Powered-By": "ASP.NET" }, "ResponseBody": { "cost": 14, - "timespan": "2021-04-29T17:30:00Z/2021-04-29T17:45:00Z", + "timespan": "2021-05-04T18:15:00Z/2021-05-04T18:30:00Z", "interval": "PT5M", "value": [ { @@ -52,15 +49,15 @@ "metadatavalues": [], "data": [ { - "timeStamp": "2021-04-29T17:30:00Z", + "timeStamp": "2021-05-04T18:15:00Z", "average": 20.0 }, { - "timeStamp": "2021-04-29T17:35:00Z", + "timeStamp": "2021-05-04T18:20:00Z", "average": 26.25 }, { - "timeStamp": "2021-04-29T17:40:00Z", + "timeStamp": "2021-05-04T18:25:00Z", "average": 27.692307692307693 } ] @@ -75,7 +72,7 @@ } ], "Variables": { - "DateTimeOffsetNow": "2021-04-29T10:51:45.5046382-07:00", + "DateTimeOffsetNow": "2021-05-04T11:37:47.2330682-07:00", "METRICS_RESOURCE_ID": "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-pakrymmon2/providers/Microsoft.OperationalInsights/workspaces/pakrymmon2-logs", "RandomSeed": "1882952796" } From 77d1530593ecb95aa8ae4c0f8f2ce3242e1f1a61 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 4 May 2021 12:15:38 -0700 Subject: [PATCH 2/5] api --- .../api/Azure.Monitor.Query.netstandard2.0.cs | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs index 114de9ed72412..777fd48d0ed35 100644 --- a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs +++ b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs @@ -3,7 +3,7 @@ namespace Azure.Monitor.Query public partial class LogsBatchQuery { protected LogsBatchQuery() { } - public virtual string AddQuery(string workspaceId, string query, System.TimeSpan? timeSpan = default(System.TimeSpan?), Azure.Monitor.Query.LogsQueryOptions options = null) { throw null; } + public virtual string AddQuery(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null) { throw null; } public virtual Azure.Response Submit(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SubmitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -13,10 +13,10 @@ protected LogsClient() { } public LogsClient(Azure.Core.TokenCredential credential) { } public LogsClient(Azure.Core.TokenCredential credential, Azure.Monitor.Query.LogsClientOptions options) { } public virtual Azure.Monitor.Query.LogsBatchQuery CreateBatchQuery() { throw null; } - public virtual Azure.Response Query(string workspaceId, string query, System.TimeSpan? timeSpan = default(System.TimeSpan?), Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> QueryAsync(string workspaceId, string query, System.TimeSpan? timeSpan = default(System.TimeSpan?), Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> QueryAsync(string workspaceId, string query, System.TimeSpan? timeSpan = default(System.TimeSpan?), Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> Query(string workspaceId, string query, System.TimeSpan? timeSpan = default(System.TimeSpan?), Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Query(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> QueryAsync(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> QueryAsync(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> Query(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class LogsClientOptions : Azure.Core.ClientOptions { @@ -36,13 +36,11 @@ public partial class MetricQueryOptions { public MetricQueryOptions() { } public System.Collections.Generic.IList Aggregations { get { throw null; } } - public System.TimeSpan? Duration { get { throw null; } set { } } - public System.DateTimeOffset? EndTime { get { throw null; } set { } } public string Filter { get { throw null; } set { } } public System.TimeSpan? Interval { get { throw null; } set { } } public string MetricNamespace { get { throw null; } set { } } public string OrderBy { get { throw null; } set { } } - public System.DateTimeOffset? StartTime { get { throw null; } set { } } + public Azure.Monitor.Query.QueryTimeSpan? TimeSpan { get { throw null; } set { } } public int? Top { get { throw null; } set { } } } public partial class MetricsClient @@ -65,6 +63,25 @@ public enum ServiceVersion V2018_01_01 = 0, } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct QueryTimeSpan : System.IEquatable + { + public QueryTimeSpan(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } + public QueryTimeSpan(System.DateTimeOffset startTime, System.TimeSpan duration) { throw null; } + public QueryTimeSpan(System.TimeSpan duration) { throw null; } + public QueryTimeSpan(System.TimeSpan duration, System.DateTimeOffset endTime) { throw null; } + public System.TimeSpan Duration { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public static Azure.Monitor.Query.QueryTimeSpan MaxValue { get { throw null; } } + public System.DateTimeOffset? StartTime { get { throw null; } } + public bool Equals(Azure.Monitor.Query.QueryTimeSpan other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Monitor.Query.QueryTimeSpan left, Azure.Monitor.Query.QueryTimeSpan right) { throw null; } + public static implicit operator Azure.Monitor.Query.QueryTimeSpan (System.TimeSpan timeSpan) { throw null; } + public static bool operator !=(Azure.Monitor.Query.QueryTimeSpan left, Azure.Monitor.Query.QueryTimeSpan right) { throw null; } + public override string ToString() { throw null; } + } } namespace Azure.Monitor.Query.Models { From 775fa4890c3aabb56184ae7d03c82da31b7d72e8 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 4 May 2021 13:32:08 -0700 Subject: [PATCH 3/5] snippets --- sdk/monitor/Azure.Monitor.Query/README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.Query/README.md b/sdk/monitor/Azure.Monitor.Query/README.md index 539756fccc586..a7b1c022dde73 100644 --- a/sdk/monitor/Azure.Monitor.Query/README.md +++ b/sdk/monitor/Azure.Monitor.Query/README.md @@ -65,7 +65,7 @@ You can query logs using the `LogsClient.QueryAsync`. The result would be return ```C# Snippet:QueryLogsAsTable LogsClient client = new LogsClient(new DefaultAzureCredential()); string workspaceId = ""; -Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated"); +Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated", TimeSpan.FromDays(1)); LogsQueryResultTable table = response.Value.PrimaryTable; @@ -93,7 +93,8 @@ string workspaceId = ""; // Query TOP 10 resource groups by event count Response> response = await client.QueryAsync(workspaceId, - "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count"); + "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", + TimeSpan.FromDays(1)); foreach (var logEntryModel in response.Value) { @@ -111,7 +112,8 @@ string workspaceId = ""; // Query TOP 10 resource groups by event count Response> response = await client.QueryAsync(workspaceId, - "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup"); + "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup", + TimeSpan.FromDays(1)); foreach (var resourceGroup in response.Value) { @@ -130,8 +132,8 @@ string workspaceId = ""; // Query TOP 10 resource groups by event count // And total event count LogsBatchQuery batch = client.CreateBatchQuery(); -string countQueryId = batch.AddQuery(workspaceId, "AzureActivity | count"); -string topQueryId = batch.AddQuery(workspaceId, "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count"); +string countQueryId = batch.AddQuery(workspaceId, "AzureActivity | count", TimeSpan.FromDays(1)); +string topQueryId = batch.AddQuery(workspaceId, "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", TimeSpan.FromDays(1)); Response response = await batch.SubmitAsync(); @@ -152,7 +154,7 @@ You can also dynamically inspect the list of columns. The following example prin ```C# Snippet:QueryLogsPrintTable LogsClient client = new LogsClient(new DefaultAzureCredential()); string workspaceId = ""; -Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated"); +Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated", TimeSpan.FromDays(1)); LogsQueryResultTable table = response.Value.PrimaryTable; @@ -182,7 +184,7 @@ Some queries take longer to execute than the default service timeout allows. You ```C# Snippet:QueryLogsPrintTable LogsClient client = new LogsClient(new DefaultAzureCredential()); string workspaceId = ""; -Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated"); +Response response = await client.QueryAsync(workspaceId, "AzureActivity | top 10 by TimeGenerated", TimeSpan.FromDays(1)); LogsQueryResultTable table = response.Value.PrimaryTable; @@ -218,7 +220,7 @@ string workspaceId = ""; LogsClient client = new LogsClient(new DefaultAzureCredential()); try { - await client.QueryAsync(workspaceId, "My Not So Valid Query"); + await client.QueryAsync(workspaceId, "My Not So Valid Query", TimeSpan.FromDays(1)); } catch (Exception e) { From 5119a54cbeb766de6fc455de64dcffb27944a892 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 5 May 2021 07:43:20 -0700 Subject: [PATCH 4/5] Update sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs Co-authored-by: Jesse Squire --- sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs b/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs index 919e893710c03..9edf30f4eae70 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs @@ -14,7 +14,7 @@ namespace Azure.Monitor.Query /// /// Represents the maximum . /// - public static QueryTimeSpan MaxValue => new QueryTimeSpan(TimeSpan.MaxValue); + public static QueryTimeSpan MaxValue { get; } = new QueryTimeSpan(TimeSpan.MaxValue); /// /// Gets the duration of the interval. @@ -146,4 +146,4 @@ public override int GetHashCode() return HashCodeBuilder.Combine(StartTime, EndTime, Duration); } } -} \ No newline at end of file +} From f0a28aaebc9c96c99510e39bd7ea0148f8df5411 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 5 May 2021 08:27:59 -0700 Subject: [PATCH 5/5] fb --- .../api/Azure.Monitor.Query.netstandard2.0.cs | 50 ++++++------- .../{QueryTimeSpan.cs => DateTimeRange.cs} | 67 ++++++++--------- .../Azure.Monitor.Query/src/LogsClient.cs | 34 ++++----- .../src/MetricQueryOptions.cs | 2 +- .../src/Models/LogsBatchQuery.cs | 6 +- .../tests/DateTimeRangeTests.cs | 43 +++++++++++ .../tests/LogsQueryClientClientLiveTests.cs | 74 +++++++++---------- .../Azure.Monitor.Query/tests/LogsTestData.cs | 4 +- .../tests/MetricsQueryClientLiveTests.cs | 16 ++-- .../tests/MetricsTestData.cs | 2 +- .../tests/QueryTimeSpanTests.cs | 38 ---------- 11 files changed, 171 insertions(+), 165 deletions(-) rename sdk/monitor/Azure.Monitor.Query/src/{QueryTimeSpan.cs => DateTimeRange.cs} (58%) create mode 100644 sdk/monitor/Azure.Monitor.Query/tests/DateTimeRangeTests.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs diff --git a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs index 777fd48d0ed35..94d0c65fa359b 100644 --- a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs +++ b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs @@ -1,9 +1,28 @@ namespace Azure.Monitor.Query { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DateTimeRange : System.IEquatable + { + public DateTimeRange(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } + public DateTimeRange(System.DateTimeOffset startTime, System.TimeSpan duration) { throw null; } + public DateTimeRange(System.TimeSpan duration) { throw null; } + public DateTimeRange(System.TimeSpan duration, System.DateTimeOffset endTime) { throw null; } + public System.TimeSpan Duration { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public static Azure.Monitor.Query.DateTimeRange MaxValue { get { throw null; } } + public System.DateTimeOffset? StartTime { get { throw null; } } + public bool Equals(Azure.Monitor.Query.DateTimeRange other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Monitor.Query.DateTimeRange left, Azure.Monitor.Query.DateTimeRange right) { throw null; } + public static implicit operator Azure.Monitor.Query.DateTimeRange (System.TimeSpan timeSpan) { throw null; } + public static bool operator !=(Azure.Monitor.Query.DateTimeRange left, Azure.Monitor.Query.DateTimeRange right) { throw null; } + public override string ToString() { throw null; } + } public partial class LogsBatchQuery { protected LogsBatchQuery() { } - public virtual string AddQuery(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null) { throw null; } + public virtual string AddQuery(string workspaceId, string query, Azure.Monitor.Query.DateTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = null) { throw null; } public virtual Azure.Response Submit(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SubmitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -13,10 +32,10 @@ protected LogsClient() { } public LogsClient(Azure.Core.TokenCredential credential) { } public LogsClient(Azure.Core.TokenCredential credential, Azure.Monitor.Query.LogsClientOptions options) { } public virtual Azure.Monitor.Query.LogsBatchQuery CreateBatchQuery() { throw null; } - public virtual Azure.Response Query(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> QueryAsync(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> QueryAsync(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> Query(string workspaceId, string query, Azure.Monitor.Query.QueryTimeSpan timeSpan, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Query(string workspaceId, string query, Azure.Monitor.Query.DateTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> QueryAsync(string workspaceId, string query, Azure.Monitor.Query.DateTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> QueryAsync(string workspaceId, string query, Azure.Monitor.Query.DateTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> Query(string workspaceId, string query, Azure.Monitor.Query.DateTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class LogsClientOptions : Azure.Core.ClientOptions { @@ -40,7 +59,7 @@ public MetricQueryOptions() { } public System.TimeSpan? Interval { get { throw null; } set { } } public string MetricNamespace { get { throw null; } set { } } public string OrderBy { get { throw null; } set { } } - public Azure.Monitor.Query.QueryTimeSpan? TimeSpan { get { throw null; } set { } } + public Azure.Monitor.Query.DateTimeRange? TimeSpan { get { throw null; } set { } } public int? Top { get { throw null; } set { } } } public partial class MetricsClient @@ -63,25 +82,6 @@ public enum ServiceVersion V2018_01_01 = 0, } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QueryTimeSpan : System.IEquatable - { - public QueryTimeSpan(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } - public QueryTimeSpan(System.DateTimeOffset startTime, System.TimeSpan duration) { throw null; } - public QueryTimeSpan(System.TimeSpan duration) { throw null; } - public QueryTimeSpan(System.TimeSpan duration, System.DateTimeOffset endTime) { throw null; } - public System.TimeSpan Duration { get { throw null; } } - public System.DateTimeOffset? EndTime { get { throw null; } } - public static Azure.Monitor.Query.QueryTimeSpan MaxValue { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public bool Equals(Azure.Monitor.Query.QueryTimeSpan other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Monitor.Query.QueryTimeSpan left, Azure.Monitor.Query.QueryTimeSpan right) { throw null; } - public static implicit operator Azure.Monitor.Query.QueryTimeSpan (System.TimeSpan timeSpan) { throw null; } - public static bool operator !=(Azure.Monitor.Query.QueryTimeSpan left, Azure.Monitor.Query.QueryTimeSpan right) { throw null; } - public override string ToString() { throw null; } - } } namespace Azure.Monitor.Query.Models { diff --git a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs b/sdk/monitor/Azure.Monitor.Query/src/DateTimeRange.cs similarity index 58% rename from sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs rename to sdk/monitor/Azure.Monitor.Query/src/DateTimeRange.cs index 9edf30f4eae70..1680b154827c4 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/QueryTimeSpan.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/DateTimeRange.cs @@ -9,33 +9,34 @@ namespace Azure.Monitor.Query /// /// Represents a span of time over which the query would be executed. /// - public readonly struct QueryTimeSpan : IEquatable + public readonly struct DateTimeRange : IEquatable { /// - /// Represents the maximum . + /// Represents the maximum . /// - public static QueryTimeSpan MaxValue { get; } = new QueryTimeSpan(TimeSpan.MaxValue); + public static DateTimeRange MaxValue => new DateTimeRange(TimeSpan.MaxValue); /// - /// Gets the duration of the interval. + /// Gets the duration of the range. /// public TimeSpan Duration { get; } /// - /// Gets the start time of the interval. + /// Gets the start time of the range. /// public DateTimeOffset? StartTime { get; } /// - /// Gets the end time of the interval. + /// Gets the end time of the range. /// public DateTimeOffset? EndTime { get; } /// - /// Initializes an instance of using a duration value. + /// Initializes an instance of using a duration value. + /// The exact query range would be determined by the service when executing the query. /// - /// The duration of the interval. - public QueryTimeSpan(TimeSpan duration) + /// The duration of the range. + public DateTimeRange(TimeSpan duration) { Duration = duration; StartTime = null; @@ -43,11 +44,11 @@ public QueryTimeSpan(TimeSpan duration) } /// - /// Initializes an instance of using a start time and a duration value. + /// Initializes an instance of using a start time and a duration value. /// - /// The start of the interval. - /// The duration of the interval. - public QueryTimeSpan(DateTimeOffset startTime, TimeSpan duration) + /// The start of the range. + /// The duration of the range. + public DateTimeRange(DateTimeOffset startTime, TimeSpan duration) { Duration = duration; StartTime = startTime; @@ -55,11 +56,11 @@ public QueryTimeSpan(DateTimeOffset startTime, TimeSpan duration) } /// - /// Initializes an instance of using a duration and an end time. + /// Initializes an instance of using a duration and an end time. /// - /// The duration of the interval. - /// The end of the interval. - public QueryTimeSpan(TimeSpan duration, DateTimeOffset endTime) + /// The duration of the range. + /// The end of the range. + public DateTimeRange(TimeSpan duration, DateTimeOffset endTime) { Duration = duration; StartTime = null; @@ -67,11 +68,11 @@ public QueryTimeSpan(TimeSpan duration, DateTimeOffset endTime) } /// - /// Initializes an instance of using a start time and an end time. + /// Initializes an instance of using a start time and an end time. /// - /// The start of the interval. - /// The end of the interval. - public QueryTimeSpan(DateTimeOffset startTime, DateTimeOffset endTime) + /// The start of the range. + /// The end of the range. + public DateTimeRange(DateTimeOffset startTime, DateTimeOffset endTime) { Duration = endTime - startTime; StartTime = startTime; @@ -79,10 +80,10 @@ public QueryTimeSpan(DateTimeOffset startTime, DateTimeOffset endTime) } /// - /// Converts a to a . + /// Converts a to a . /// /// The value to convert. - public static implicit operator QueryTimeSpan(TimeSpan timeSpan) => new QueryTimeSpan(timeSpan); + public static implicit operator DateTimeRange(TimeSpan timeSpan) => new DateTimeRange(timeSpan); /// public override string ToString() @@ -105,7 +106,7 @@ public override string ToString() } /// - public bool Equals(QueryTimeSpan other) + public bool Equals(DateTimeRange other) { return Duration.Equals(other.Duration) && Nullable.Equals(StartTime, other.StartTime) && @@ -115,27 +116,27 @@ public bool Equals(QueryTimeSpan other) /// public override bool Equals(object obj) { - return obj is QueryTimeSpan other && Equals(other); + return obj is DateTimeRange other && Equals(other); } /// - /// Determines if two values are the same. + /// Determines if two values are the same. /// - /// The first to compare. - /// The second to compare. + /// The first to compare. + /// The second to compare. /// True if and are the same; otherwise, false. - public static bool operator ==(QueryTimeSpan left, QueryTimeSpan right) + public static bool operator ==(DateTimeRange left, DateTimeRange right) { return left.Equals(right); } /// - /// Determines if two values are different. + /// Determines if two values are different. /// - /// The first to compare. - /// The second to compare. + /// The first to compare. + /// The second to compare. /// True if and are different; otherwise, false. - public static bool operator !=(QueryTimeSpan left, QueryTimeSpan right) + public static bool operator !=(DateTimeRange left, DateTimeRange right) { return !left.Equals(right); } diff --git a/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs b/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs index e9189c567e122..c291b2e0992f9 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/LogsClient.cs @@ -59,13 +59,13 @@ protected LogsClient() /// /// The workspace to include in the query. /// The query text to execute. - /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. + /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. /// The to configure the query. /// The to use. /// Query results mapped to a type . - public virtual Response> Query(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual Response> Query(string workspaceId, string query, DateTimeRange timeRange, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { - Response response = Query(workspaceId, query, timeSpan, options, cancellationToken); + Response response = Query(workspaceId, query, timeRange, options, cancellationToken); return Response.FromValue(_rowBinder.BindResults(response), response.GetRawResponse()); } @@ -75,13 +75,13 @@ public virtual Response> Query(string workspaceId, string qu /// /// The workspace to include in the query. /// The query text to execute. - /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. + /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. /// The to configure the query. /// The to use. /// Query results mapped to a type . - public virtual async Task>> QueryAsync(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task>> QueryAsync(string workspaceId, string query, DateTimeRange timeRange, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { - Response response = await QueryAsync(workspaceId, query, timeSpan, options, cancellationToken).ConfigureAwait(false); + Response response = await QueryAsync(workspaceId, query, timeRange, options, cancellationToken).ConfigureAwait(false); return Response.FromValue(_rowBinder.BindResults(response), response.GetRawResponse()); } @@ -91,17 +91,17 @@ public virtual async Task>> QueryAsync(string works /// /// The workspace to include in the query. /// The query text to execute. - /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. + /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. /// The to configure the query. /// The to use. /// The containing the query results. - public virtual Response Query(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual Response Query(string workspaceId, string query, DateTimeRange timeRange, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(LogsClient)}.{nameof(Query)}"); scope.Start(); try { - return ExecuteAsync(workspaceId, query, timeSpan, options, false, cancellationToken).EnsureCompleted(); + return ExecuteAsync(workspaceId, query, timeRange, options, false, cancellationToken).EnsureCompleted(); } catch (Exception e) { @@ -115,17 +115,17 @@ public virtual Response Query(string workspaceId, string query, /// /// The workspace to include in the query. /// The query text to execute. - /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. + /// The timespan over which to query data. Logs would be filtered to include entries produced starting at Now - timeSpan. /// The to configure the query. /// The to use. /// The with the query results. - public virtual async Task> QueryAsync(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null, CancellationToken cancellationToken = default) + public virtual async Task> QueryAsync(string workspaceId, string query, DateTimeRange timeRange, LogsQueryOptions options = null, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(LogsClient)}.{nameof(Query)}"); scope.Start(); try { - return await ExecuteAsync(workspaceId, query, timeSpan, options, true, cancellationToken).ConfigureAwait(false); + return await ExecuteAsync(workspaceId, query, timeRange, options, true, cancellationToken).ConfigureAwait(false); } catch (Exception e) { @@ -143,12 +143,12 @@ public virtual LogsBatchQuery CreateBatchQuery() return new LogsBatchQuery(_clientDiagnostics, _queryClient, _rowBinder); } - internal static QueryBody CreateQueryBody(string query, QueryTimeSpan timeSpan, LogsQueryOptions options, out string prefer) + internal static QueryBody CreateQueryBody(string query, DateTimeRange timeRange, LogsQueryOptions options, out string prefer) { var queryBody = new QueryBody(query); - if (timeSpan != QueryTimeSpan.MaxValue) + if (timeRange != DateTimeRange.MaxValue) { - queryBody.Timespan = timeSpan.ToString(); + queryBody.Timespan = timeRange.ToString(); } prefer = null; @@ -166,14 +166,14 @@ internal static QueryBody CreateQueryBody(string query, QueryTimeSpan timeSpan, return queryBody; } - private async Task> ExecuteAsync(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options, bool async, CancellationToken cancellationToken = default) + private async Task> ExecuteAsync(string workspaceId, string query, DateTimeRange timeRange, LogsQueryOptions options, bool async, CancellationToken cancellationToken = default) { if (workspaceId == null) { throw new ArgumentNullException(nameof(workspaceId)); } - QueryBody queryBody = CreateQueryBody(query, timeSpan, options, out string prefer); + QueryBody queryBody = CreateQueryBody(query, timeRange, options, out string prefer); using var message = _queryClient.CreateExecuteRequest(workspaceId, queryBody, prefer); if (options?.Timeout != null) diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs index a963cd2a94974..a874562de9500 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricQueryOptions.cs @@ -15,7 +15,7 @@ public class MetricQueryOptions /// /// Gets or sets the time span over which the metric would be queried. /// - public QueryTimeSpan? TimeSpan { get; set; } + public DateTimeRange? TimeSpan { get; set; } /// /// Gets ot sets the interval to sample metrics at. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs index 10ec19a472688..9aace7823e52c 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs @@ -41,17 +41,17 @@ protected LogsBatchQuery() /// /// The workspace to include in the query. /// The query text to execute. - /// The timespan over which to query data. + /// The timespan over which to query data. /// The to configure the query. /// The query identifier that has to be passed into to get the result. - public virtual string AddQuery(string workspaceId, string query, QueryTimeSpan timeSpan, LogsQueryOptions options = null) + public virtual string AddQuery(string workspaceId, string query, DateTimeRange timeRange, LogsQueryOptions options = null) { var id = _counter.ToString("G", CultureInfo.InvariantCulture); _counter++; var logQueryRequest = new LogQueryRequest() { Id = id, - Body = LogsClient.CreateQueryBody(query, timeSpan, options, out string prefer), + Body = LogsClient.CreateQueryBody(query, timeRange, options, out string prefer), Workspace = workspaceId }; if (prefer != null) diff --git a/sdk/monitor/Azure.Monitor.Query/tests/DateTimeRangeTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/DateTimeRangeTests.cs new file mode 100644 index 0000000000000..6f3fb5d6aecce --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/tests/DateTimeRangeTests.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using NUnit.Framework; + +namespace Azure.Monitor.Query.Tests +{ + public class DateTimeRangeTests + { + [Test] + public void ToStringDurationTests() + { + var duration = TimeSpan.FromMinutes(23); + Assert.AreEqual("PT23M", new DateTimeRange(duration).ToString()); + } + + [Test] + public void ToStringDurationEndTests() + { + var duration = TimeSpan.FromMinutes(23); + var endTime = new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero); + Assert.AreEqual("PT23M/2021-05-04T03:02:01.0000000Z", new DateTimeRange(duration, endTime).ToString()); + } + + [Test] + public void ToStringStartDurationTests() + { + var startTime = new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero); + var duration = TimeSpan.FromMinutes(23); + Assert.AreEqual("2021-05-04T03:02:01.0000000Z/PT23M", new DateTimeRange(startTime, duration).ToString()); + } + + [Test] + public void ToStringStartEndTests() + { + var startTime = new DateTimeOffset(2021, 1, 2, 3, 4, 5, TimeSpan.Zero); + var endTime = new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero); + + Assert.AreEqual("2021-01-02T03:04:05.0000000Z/2021-05-04T03:02:01.0000000Z", new DateTimeRange(startTime, endTime).ToString()); + } + } +} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs index ca75653c71f26..81274b5470ab8 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs @@ -44,7 +44,7 @@ public async Task CanQuery() $"{_logsTestData.TableAName} |" + $"project {LogsTestData.StringColumnName}, {LogsTestData.IntColumnName}, {LogsTestData.BoolColumnName}, {LogsTestData.FloatColumnName} |" + $"order by {LogsTestData.StringColumnName} asc", - _logsTestData.DataTimeSpan); + _logsTestData.DataTimeRange); var resultTable = results.Value.Tables.Single(); CollectionAssert.IsNotEmpty(resultTable.Columns); @@ -69,7 +69,7 @@ public async Task CanQueryIntoPrimitiveString() var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.StringColumnName} | order by {LogsTestData.StringColumnName} asc", - _logsTestData.DataTimeSpan); + _logsTestData.DataTimeRange); CollectionAssert.AreEqual(new[] {"a", "b", "c"}, results.Value); } @@ -80,7 +80,7 @@ public async Task CanQueryIntoPrimitiveInt() var client = CreateClient(); var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | count", - _logsTestData.DataTimeSpan); + _logsTestData.DataTimeRange); Assert.AreEqual(_logsTestData.TableA.Count, results.Value[0]); } @@ -94,7 +94,7 @@ public async Task CanQueryIntoClass() $"{_logsTestData.TableAName} |" + $"project-rename Name = {LogsTestData.StringColumnName}, Age = {LogsTestData.IntColumnName} |" + $"order by Name asc", - _logsTestData.DataTimeSpan); + _logsTestData.DataTimeRange); CollectionAssert.AreEqual(new[] { @@ -114,7 +114,7 @@ public async Task CanQueryIntoDictionary() $"project-rename Name = {LogsTestData.StringColumnName}, Age = {LogsTestData.IntColumnName} |" + $"project Name, Age |" + $"order by Name asc", - _logsTestData.DataTimeSpan); + _logsTestData.DataTimeRange); CollectionAssert.AreEqual(new[] { @@ -134,7 +134,7 @@ public async Task CanQueryIntoIDictionary() $"project-rename Name = {LogsTestData.StringColumnName}, Age = {LogsTestData.IntColumnName} |" + $"project Name, Age |" + $"order by Name asc", - _logsTestData.DataTimeSpan); + _logsTestData.DataTimeRange); CollectionAssert.AreEqual(new[] { @@ -149,8 +149,8 @@ public async Task CanQueryBatch() { var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat", _logsTestData.DataTimeSpan); - string id2 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat", _logsTestData.DataTimeSpan); + string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat", _logsTestData.DataTimeRange); + string id2 = batch.AddQuery(TestEnvironment.WorkspaceId, "Heartbeat", _logsTestData.DataTimeRange); Response response = await batch.SubmitAsync(); var result1 = response.Value.GetResult(id1); @@ -178,7 +178,7 @@ public async Task CanQueryAllSupportedTypes() "10s," + "decimal(0.10101)," + "bool(null)" + - "]", _logsTestData.DataTimeSpan); + "]", _logsTestData.DataTimeRange); LogsQueryResultRow row = results.Value.PrimaryTable.Rows[0]; @@ -231,7 +231,7 @@ public async Task CanQueryAllSupportedTypesIntoModel() "'string value'," + "10s," + "decimal(0.10101)" + - "]", _logsTestData.DataTimeSpan); + "]", _logsTestData.DataTimeRange); TestModelForTypes row = results.Value[0]; @@ -263,7 +263,7 @@ public async Task CanQueryAllSupportedTypesIntoModelNullable() "'string value'," + "10s," + "decimal(0.10101)" + - "]", _logsTestData.DataTimeSpan); + "]", _logsTestData.DataTimeRange); TestModelForTypesNullable row = results.Value[0]; @@ -295,7 +295,7 @@ public async Task CanQueryAllSupportedTypesIntoModelNulls() "'I cant be null'," + "timespan(null)," + "decimal(null)," + - "]", _logsTestData.DataTimeSpan); + "]", _logsTestData.DataTimeRange); TestModelForTypesNullable row = results.Value[0]; @@ -315,15 +315,15 @@ public async Task CanQueryIntoPrimitive() { var client = CreateClient(); - Assert.AreEqual(DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(false, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ false ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(Guid.Parse("74be27de-1e4e-49d9-b579-fe0b331d3642"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(12345, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ 12345 ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(1234567890123, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ 1234567890123 ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(12345.6789d, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ 12345.6789 ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual("string value", (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (String: string) [ \"string value\" ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(TimeSpan.FromSeconds(10), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ 10s ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.AreEqual(0.10101m, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(0.10101) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.AreEqual(DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(2015-12-31 23:59:59.9) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(false, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ false ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(Guid.Parse("74be27de-1e4e-49d9-b579-fe0b331d3642"), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(74be27de-1e4e-49d9-b579-fe0b331d3642) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(12345, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ 12345 ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(1234567890123, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ 1234567890123 ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(12345.6789d, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ 12345.6789 ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual("string value", (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (String: string) [ \"string value\" ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(TimeSpan.FromSeconds(10), (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ 10s ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.AreEqual(0.10101m, (await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(0.10101) ]", _logsTestData.DataTimeRange)).Value[0]); } [RecordedTest] @@ -331,14 +331,14 @@ public async Task CanQueryIntoNullablePrimitive() { var client = CreateClient(); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ bool(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ int(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ long(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ double(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ timespan(null) ]", _logsTestData.DataTimeSpan)).Value[0]); - Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(null) ]", _logsTestData.DataTimeSpan)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Bool: bool) [ bool(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Guid: guid) [ guid(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Int: int) [ int(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Long: long) [ long(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Double: double) [ double(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Timespan: timespan) [ timespan(null) ]", _logsTestData.DataTimeRange)).Value[0]); + Assert.IsNull((await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (Decimal: decimal) [ decimal(null) ]", _logsTestData.DataTimeRange)).Value[0]); } [RecordedTest] @@ -346,7 +346,7 @@ public async Task CanQueryIntoNullablePrimitiveNull() { var client = CreateClient(); - var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]", _logsTestData.DataTimeSpan); + var results = await client.QueryAsync(TestEnvironment.WorkspaceId, $"datatable (DateTime: datetime) [ datetime(null) ]", _logsTestData.DataTimeRange); Assert.IsNull(results.Value[0]); } @@ -381,7 +381,7 @@ public async Task CanQueryBatchWithTimespan() var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.TimeGeneratedColumnName}", _logsTestData.DataTimeSpan); + string id1 = batch.AddQuery(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.TimeGeneratedColumnName}", _logsTestData.DataTimeRange); string id2 = batch.AddQuery(TestEnvironment.WorkspaceId, $"{_logsTestData.TableAName} | project {LogsTestData.TimeGeneratedColumnName}", timespan); Response response = await batch.SubmitAsync(); @@ -399,7 +399,7 @@ public async Task CanQueryBatchWithTimespan() public void ThrowsExceptionWhenQueryFails() { var client = CreateClient(); - var exception = Assert.ThrowsAsync(async () => await client.QueryAsync(TestEnvironment.WorkspaceId, "this won't work", _logsTestData.DataTimeSpan)); + var exception = Assert.ThrowsAsync(async () => await client.QueryAsync(TestEnvironment.WorkspaceId, "this won't work", _logsTestData.DataTimeRange)); Assert.AreEqual("BadArgumentError", exception.ErrorCode); StringAssert.StartsWith("The request had some invalid properties", exception.Message); @@ -411,7 +411,7 @@ public async Task ThrowsExceptionWhenQueryFailsBatch() var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, "this won't work", _logsTestData.DataTimeSpan); + var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, "this won't work", _logsTestData.DataTimeRange); var batchResult = await batch.SubmitAsync(); var exception = Assert.Throws(() => batchResult.Value.GetResult(queryId)); @@ -426,7 +426,7 @@ public async Task ThrowsExceptionWhenBatchQueryNotFound() var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan); + batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeRange); var batchResult = await batch.SubmitAsync(); var exception = Assert.Throws(() => batchResult.Value.GetResult("12345")); @@ -442,7 +442,7 @@ public async Task CanQueryWithStatistics(bool include) { var client = CreateClient(); - var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan, options: new LogsQueryOptions() + var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeRange, options: new LogsQueryOptions() { IncludeStatistics = include }); @@ -465,7 +465,7 @@ public async Task CanQueryWithStatisticsBatch(bool include) var client = CreateClient(); LogsBatchQuery batch = InstrumentClient(client.CreateBatchQuery()); - var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan, options: new LogsQueryOptions() + var queryId = batch.AddQuery(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeRange, options: new LogsQueryOptions() { IncludeStatistics = include }); @@ -487,7 +487,7 @@ public async Task CanSetServiceTimeout() { var client = CreateClient(); - var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeSpan, options: new LogsQueryOptions() + var response = await client.QueryAsync(TestEnvironment.WorkspaceId, _logsTestData.TableAName, _logsTestData.DataTimeRange, options: new LogsQueryOptions() { Timeout = TimeSpan.FromMinutes(10) }); diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs index 877ccea50f8e8..aca9edac1eedc 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsTestData.cs @@ -39,7 +39,7 @@ public class LogsTestData private string TableANameSent => nameof(TableA) + DataVersion + "_" + RetentionWindowStart.DayOfYear; public string TableAName => TableANameSent + "_CL"; - public QueryTimeSpan DataTimeSpan => new QueryTimeSpan(RetentionWindowStart, TimeSpan.FromDays(7)); + public DateTimeRange DataTimeRange => new DateTimeRange(RetentionWindowStart, TimeSpan.FromDays(7)); private readonly MonitorQueryClientTestEnvironment _testEnvironment; private static bool _initialized; @@ -114,7 +114,7 @@ private async Task QueryCount() var logsClient = new LogsClient(_testEnvironment.Credential); try { - var countResponse = await logsClient.QueryAsync(_testEnvironment.WorkspaceId, $"{TableAName} | count", DataTimeSpan); + var countResponse = await logsClient.QueryAsync(_testEnvironment.WorkspaceId, $"{TableAName} | count", DataTimeRange); var count = countResponse.Value.Single(); return count; } diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs index f2f221f5c5fae..a41fb2c6bd0d2 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs @@ -55,7 +55,7 @@ public async Task CanQueryMetrics() new MetricQueryOptions() { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, duration) + TimeSpan = new DateTimeRange(_testData.StartTime, duration) }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -75,7 +75,7 @@ public async Task CanQueryMetricsAllAggregations() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.StartTime.Add(_testData.Duration)), + TimeSpan = new DateTimeRange(_testData.StartTime, _testData.StartTime.Add(_testData.Duration)), Aggregations = { MetricAggregationType.Average, @@ -108,7 +108,7 @@ public async Task CanQueryMetricsStartEnd() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), + TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -128,7 +128,7 @@ public async Task CanQueryMetricsStartDuration() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.Duration) + TimeSpan = new DateTimeRange(_testData.StartTime, _testData.Duration) }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -148,7 +148,7 @@ public async Task CanQueryMetricsDurationEnd() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.Duration, _testData.EndTime) + TimeSpan = new DateTimeRange(_testData.Duration, _testData.EndTime) }); var timeSeriesData = results.Value.Metrics[0].Timeseries[0].Data; @@ -185,7 +185,7 @@ public async Task CanQueryMetricsStartEndInterval() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), + TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), Interval = TimeSpan.FromMinutes(5) }); @@ -206,7 +206,7 @@ public async Task CanQueryMetricsFilter() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), + TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), Filter = $"Name eq '{_testData.Name1}'", Aggregations = { @@ -229,7 +229,7 @@ public async Task CanQueryMetricsFilterTop() new MetricQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new QueryTimeSpan(_testData.StartTime, _testData.EndTime), + TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), Filter = $"Name eq '*'", Top = 1, Aggregations = diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs index 62e39df2e9dc5..37cefd254cf08 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs @@ -85,7 +85,7 @@ private async Task MetricsPropagated(MetricsClient metricClient) var metrics = await metricClient.QueryAsync(_testEnvironment.MetricsResource, new[] {MetricName}, new MetricQueryOptions() { - TimeSpan = new QueryTimeSpan(StartTime, Duration), + TimeSpan = new DateTimeRange(StartTime, Duration), MetricNamespace = MetricNamespace, Interval = TimeSpan.FromMinutes(1), Aggregations = diff --git a/sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs deleted file mode 100644 index c3a6dd363392f..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/tests/QueryTimeSpanTests.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using NUnit.Framework; - -namespace Azure.Monitor.Query.Tests -{ - public class QueryTimeSpanTests - { - [Test] - public void ToStringDurationTests() - { - Assert.AreEqual("PT23M", new QueryTimeSpan(TimeSpan.FromMinutes(23)).ToString()); - } - - [Test] - public void ToStringDurationEndTests() - { - Assert.AreEqual("PT23M/2021-05-04T03:02:01.0000000Z", new QueryTimeSpan(TimeSpan.FromMinutes(23), new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero)).ToString()); - } - - [Test] - public void ToStringStartDurationTests() - { - Assert.AreEqual("2021-05-04T03:02:01.0000000Z/PT23M", new QueryTimeSpan(new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero), TimeSpan.FromMinutes(23)).ToString()); - } - - [Test] - public void ToStringStartEndTests() - { - Assert.AreEqual("2021-01-02T03:04:05.0000000Z/2021-05-04T03:02:01.0000000Z", - new QueryTimeSpan( - new DateTimeOffset(2021, 1, 2, 3, 4, 5, TimeSpan.Zero), - new DateTimeOffset(2021, 5, 4, 3, 2, 1, TimeSpan.Zero)).ToString()); - } - } -} \ No newline at end of file